Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1837327

Summary: validatedb.sh script fails to run psql
Product: Red Hat Enterprise Virtualization Manager Reporter: Juan Orti Alcaine <jortialc>
Component: ovirt-engineAssignee: Lev Veyde <lveyde>
Status: CLOSED ERRATA QA Contact: Lucie Leistnerova <lleistne>
Severity: low Docs Contact:
Priority: low    
Version: 4.3.9CC: lleistne, michal.skrivanek, pelauter, sbonazzo
Target Milestone: ovirt-4.3.11Keywords: EasyFix, ZStream
Target Release: 4.3.11   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-engine-4.3.11.2 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-30 10:07:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Juan Orti Alcaine 2020-05-19 09:42:15 UTC
Description of problem:
Running the script /usr/share/ovirt-engine/setup/dbutils/validatedb.sh fails because it cannot find the psql binary, as it has to use the software collection.

Version-Release number of selected component (if applicable):
ovirt-engine-setup-plugin-ovirt-engine-4.3.9.4-11.el7.noarch

How reproducible:
Always

Steps to Reproduce:
1. Run the script in the manager:

~~~
# . /etc/ovirt-engine/engine.conf.d/10-setup-database.conf
# export PGPASSWORD=$ENGINE_DB_PASSWORD
# cd /usr/share/ovirt-engine/setup/dbutils
# ./validatedb.sh --user=engine --database=engine
~~~

Actual results:

~~~
./dbfunc-base.sh: line 34: psql: command not found
FATAL: Cannot execute sql command: --file=./fkvalidator_sp.sql
./dbfunc-base.sh: line 34: psql: command not found
FATAL: Cannot execute sql command: --file=./fkvalidator_sp_drop.sql
~~~

Expected results:


Additional info:

Comment 1 Juan Orti Alcaine 2020-05-21 07:48:29 UTC
Running it with the correct scl works, but I'm not sure if the psql detection logic should do that automatically.

# . /etc/ovirt-engine/engine.conf.d/10-setup-database.conf
# scl enable rh-postgresql10 "PGPASSWORD=$ENGINE_DB_PASSWORD /usr/share/ovirt-engine/setup/dbutils/validatedb.sh --user=engine --database=engine"

Comment 11 Lucie Leistnerova 2020-07-23 14:20:02 UTC
script ran without any psql error

verified in ovirt-engine-4.3.11.2-0.1.el7.noarch

Comment 14 errata-xmlrpc 2020-09-30 10:07:13 UTC
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 (Red Hat Virtualization Engine security, bug fix 4.3.11), 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/RHBA-2020:4112