Issues with PostgreSQL database steps in HA setup
Opened this issue · 0 comments
yussufsh commented
Location:
Chapter 2.3. Setting up the HAProxy load balancer and the PostgreSQL database
Step 5-8 runs psql
commands from the container path /opt/rh/rh-postgresql96/root/usr/bin/psql
. This path does not exist in registry.redhat.io/rhel8/postgresql-13:1-109
image.
[root@HA-quay1 ~]# mkdir -p /var/lib/pgsql/data1
[root@HA-quay1 ~]# chmod 777 /var/lib/pgsql/data1
[root@HA-quay1 ~]# podman run -d --name postgresql_database1 \
> -v /var/lib/pgsql/data1:/var/lib/pgsql/data1:Z \
> -e POSTGRESQL_USER=quayuser -e POSTGRESQL_PASSWORD=quaypass \
> -e POSTGRESQL_DATABASE=quaydb -p 5439:5432 \
> registry.redhat.io/rhel8/postgresql-13:1-109
e1763f752a243395186d51bdc1d2583cb8a79be20deb88c7e6074b66802e6635
[root@HA-quay1 ~]# podman exec -it postgresql_database1 /bin/bash -c 'ls /opt/rh/rh-postgresql96/root/usr/bin/psql'
ls: cannot access '/opt/rh/rh-postgresql96/root/usr/bin/psql': No such file or directory
[root@HA-quay1 ~]# podman exec -it postgresql_database1 /bin/bash -c 'which psql'
/usr/bin/psql
Possible solution:
Use /usr/bin/psql
path instead of /opt/rh/rh-postgresql96/root/usr/bin/psql
in the steps mentioned.