Bug 1837327 - validatedb.sh script fails to run psql
Summary: validatedb.sh script fails to run psql
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.3.9
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ovirt-4.3.11
: 4.3.11
Assignee: Lev Veyde
QA Contact: Lucie Leistnerova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-19 09:42 UTC by Juan Orti
Modified: 2023-10-06 20:07 UTC (History)
4 users (show)

Fixed In Version: ovirt-engine-4.3.11.2
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-30 10:07:13 UTC
oVirt Team: Integration
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:4112 0 None None None 2020-09-30 10:08:13 UTC
oVirt gerrit 109959 0 master MERGED packaging: Sync'd validatedb.sh flow with other scripts 2020-11-02 15:22:56 UTC
oVirt gerrit 110002 0 ovirt-engine-4.3 MERGED packaging: Sync'd validatedb.sh flow with other scripts 2020-11-02 15:22:56 UTC
oVirt gerrit 110014 0 ovirt-engine-4.3 MERGED packaging: Modified validatedb.sh to attempt to use SCL 2020-11-02 15:22:57 UTC

Description Juan Orti 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 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


Note You need to log in before you can comment on or make changes to this bug.