Bug 1637818 - [downstream clone - 4.2.8] engine-vacuum fails with 'vacuumdb: command not found'
Summary: [downstream clone - 4.2.8] engine-vacuum fails with 'vacuumdb: command not fo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.2.6
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.2.8
: ---
Assignee: Martin Perina
QA Contact: Lucie Leistnerova
URL:
Whiteboard:
Depends On: 1637815
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-10 07:23 UTC by Miguel Martin
Modified: 2022-03-13 15:43 UTC (History)
7 users (show)

Fixed In Version: ovirt-engine-4.2.8.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1637815
Environment:
Last Closed: 2019-01-22 12:44:50 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:0121 0 None None None 2019-01-22 12:45:01 UTC
oVirt gerrit 94821 0 master MERGED tools: engine-vacuum.sh must enable SCL if used by the engine. 2018-10-31 11:06:32 UTC
oVirt gerrit 95184 0 ovirt-engine-4.2 MERGED tools: engine-vacuum.sh must enable SCL if used by the engine. 2018-10-31 12:35:46 UTC

Description Miguel Martin 2018-10-10 07:23:13 UTC
+++ This bug was initially created as a clone of Bug #1637815 +++

Description of problem:

engine-vacuum fails with 'vacuumdb: command not found'

Version-Release number of selected component (if applicable):
4.2.6

How reproducible:
Always

Steps to Reproduce:
1. Open an SSH console to the oVirt manager
2. Run 'engine-vacuum' command

Actual results:
It fails with the error: 
~~~
[root@ovirt ~]# engine-vacuum
"/usr/bin/engine-vacuum: line 47: vacuumdb: command not found"
~~~

Expected results:
It should finish successfully:
~~~
[root@ovirt ~]# engine-vacuum
vacuumdb: vacuuming database "engine"
~~~

Additional info:
engine-vacuum does not load SCL environment.

Comment 1 Eli Mesika 2018-10-14 08:17:48 UTC
vacuumdb is provided with the postgresql package (client) and installed in /usr/bin which should be in the PATH

Can you please provide the output of :

# rpm -qa |grep postgresql

Comment 2 Miguel Martin 2018-10-15 07:58:18 UTC
In RHV 4.2 'postgresql' package is not installed because SCL is used to provide the required binaries, the one containing vacuumdb command is:
~~~
[root@rhvm-42 ~]# rpm -qf /opt/rh/rh-postgresql95/root/bin/vacuumdb 
rh-postgresql95-postgresql-9.5.14-1.el7.x86_64
~~~ 

'engine-backup' command detects when SCL is used:
~~~
   1933 if ! [ -z "$sclenv" ]; then
   1934         log "Setting scl env for ${sclenv}"
   1935         . scl_source enable ${sclenv}
   1936 fi
~~~

So the same is needed for 'engine-vacuum'

Comment 3 Lucie Leistnerova 2018-11-19 10:22:54 UTC
engine-vacuum works as expected without setting PATH or enabling scl

verified in ovirt-engine-tools-4.2.8-0.0.master.20181114165442.gitd4ff8e5.el7.noarch

Comment 5 Raz Tamir 2018-11-28 15:30:20 UTC
QE verification bot: the bug was verified upstream

Comment 7 errata-xmlrpc 2019-01-22 12:44:50 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, 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-2019:0121


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