Script engine-psql.sh was part of redhat-support-plugin-rhev and it was referenced from many KCS articles. In 4.2 redhat-support-plugin-rhev is obsoleted by rhvm-doc, but engine-psql.sh is not part of rhvm-doc package.
redhat-support-plugin-rhev wasn't being maintained -- and I missed the existence of this script -- apologies. I would prefer it not go in rhvm-doc.
The script also needs to be adapted to work properly with SCL PG 9.5
Hi Eli, I have checked the code and it seems that this lime: psql -U "${USERNAME}" -h "${HOST}" -p "${port}" "${ENGINE_DB_DATABASE}" "$@" | tee -a "${LOGFILE}" 2>&1 Was changed to echo "psql $@" but we need to pass -h "${HOST}" as otherwise the authentication will not work. -h is not possible as it is taken by the script and prints help instead. Can you check?
(In reply to Roman Hodain from comment #15) > Hi Eli, > > I have checked the code and it seems that this lime: > > psql -U "${USERNAME}" -h "${HOST}" -p "${port}" "${ENGINE_DB_DATABASE}" "$@" > | tee -a "${LOGFILE}" 2>&1 > > Was changed to > > echo "psql $@" > > but we need to pass -h "${HOST}" as otherwise the authentication will not > work. -h is not possible as it is taken by the script and prints help > instead. > > Can you check? Can you check setting the host in the command line . e,g : ENGINE_DB_HOST=<host ip> psql ..........
(In reply to Eli Mesika from comment #16) > (In reply to Roman Hodain from comment #15) > > Hi Eli, > > > > I have checked the code and it seems that this lime: > > > > psql -U "${USERNAME}" -h "${HOST}" -p "${port}" "${ENGINE_DB_DATABASE}" "$@" > > | tee -a "${LOGFILE}" 2>&1 > > > > Was changed to > > > > echo "psql $@" > > > > but we need to pass -h "${HOST}" as otherwise the authentication will not > > work. -h is not possible as it is taken by the script and prints help > > instead. > > > > Can you check? > > Can you check setting the host in the command line . e,g : > > > ENGINE_DB_HOST=<host ip> psql .......... Thanks that would work for me.
engine-psql.sh installed with ovirt-engine-dbscripts-4.2.2.4-0.1.el7.noarch to /usr/share/ovirt-engine/dbscripts/ and works verified in ovirt-engine-4.2.2.4-0.1.el7.noarch
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2018:1488
BZ<2>Jira Resync