Bug 1119436

Summary: rhevm-dwh-setup fails upgrading to 3.3.4-1
Product: Red Hat Enterprise Virtualization Manager Reporter: Amador Pahim <asegundo>
Component: ovirt-engine-dwhAssignee: Yedidyah Bar David <didi>
Status: CLOSED ERRATA QA Contact: movciari
Severity: high Docs Contact:
Priority: medium    
Version: 3.3.0CC: aberezin, asegundo, bazulay, dfediuck, iheim, juwu, mkalinin, rbalakri, Rhev-m-bugs, sbonazzo, scohen, sradco, ukar, yeylon, ylavi
Target Milestone: ---Keywords: Reopened, ZStream
Target Release: 3.5.0   
Hardware: All   
OS: Linux   
Whiteboard: integration
Fixed In Version: vt1.5 - rhevm-dwh-3.5.0-1.el6_5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1121642 (view as bug list) Environment:
Last Closed: 2015-02-11 18:15:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1121642, 1142923, 1156165    

Description Amador Pahim 2014-07-14 19:03:28 UTC
Description of problem:

rhevm-setup can upgrade from 3.2 to 3.3, but fails to start ovirt-engine-dwhd. I have to start ovirt-engine service manually, but when running rhevm-dwh-setup, I face the error: 

2014-07-14 14:03:47::DEBUG::common_utils::972::root:: retcode = 2
2014-07-14 14:03:49::DEBUG::common_utils::1477::root:: starting runPostgresSuQuery database: template1 query: "select 1;"
2014-07-14 14:03:49::DEBUG::common_utils::915::root:: Executing command --> '/bin/su -l postgres -c /usr/bin/psql -U postgres -d template1 -tA -c "select 1;"' in work
ing directory '/etc/ovirt-engine'
2014-07-14 14:03:49::DEBUG::common_utils::970::root:: output =
2014-07-14 14:03:49::DEBUG::common_utils::971::root:: stderr = Password for user postgres:
psql: fe_sendauth: no password supplied

2014-07-14 14:03:49::DEBUG::common_utils::972::root:: retcode = 2
2014-07-14 14:03:51::ERROR::rhevm-dwh-setup::703::root:: Exception caught!
2014-07-14 14:03:51::ERROR::rhevm-dwh-setup::704::root:: Traceback (most recent call last):
  File "/usr/bin/rhevm-dwh-setup", line 461, in main
    pg_updated = utils.configHbaIdent()
  File "/usr/share/ovirt-engine-dwh/common_utils.py", line 1448, in configHbaIdent
    restartPostgres(newval=='md5')
  File "/usr/share/ovirt-engine-dwh/common_utils.py", line 890, in restartPostgres
    startPostgres()
  File "/usr/share/ovirt-engine-dwh/common_utils.py", line 559, in startPostgres
    'Error: postgresql service couldn\'t be started. Stopping.'
RuntimeError: Error: postgresql service couldn't be started. Stopping.


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

From:
rhevm-3.2.6-0.50.el6ev.noarch
rhevm-dwh-3.2.4-1.el6ev.noarch

To:
rhevm-3.3.4-0.53.el6ev.noarch
rhevm-dwh-3.3.4-1.el6ev.noarch


How reproducible:
100%


Steps to Reproduce:
1. Install/configure latest RHEVM/DWH/REPORTS 3.2.
2. Run: yum update rhevm-setup rhevm-dwh rhevm-reports
3. Run: rhevm-setup
 
*Setup seems to fail with error:
  Starting ovirt-**FILTERED**-dwhd: at Mon Jul 14 15:01:14 BRT 2014[FAILED]

4. Start ovirt-engine anyway: service ovirt-engine start
5. Engine is working.
6. Run: rhevm-dwh-setup

* dwh-setup will not complete. Log is showing the mentioned message:
  psql: fe_sendauth: no password supplied



Workaround:

Change pg_hba.conf from:
--------------------------------------------------------------
# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only
local   all         all                               md5
# IPv4 local connections:
host    all         all         127.0.0.1/32          md5
# IPv6 local connections:
host    all         all         ::1/128               md5
--------------------------------------------------------------
To:
--------------------------------------------------------------
# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only
local   all         all                               ident
# IPv4 local connections:
host    all         all         127.0.0.1/32          md5
# IPv6 local connections:
host    all         all         ::1/128               md5
--------------------------------------------------------------

After the change, "rhevm-dwh-setup" will complete.

Comment 1 Shirly Radco 2014-07-15 08:38:56 UTC
This should be fixed for 3.4/3.5.
3.2 is a very old version so since there is a workaround i'm not sure the effort is worth it.

Barak, what do you think?

Comment 3 Yedidyah Bar David 2014-07-20 07:49:04 UTC
(In reply to Amador Pahim from comment #0)
> Description of problem:
> 
> rhevm-setup can upgrade from 3.2 to 3.3, but fails to start
> ovirt-engine-dwhd. I have to start ovirt-engine service manually, but when
> running rhevm-dwh-setup, I face the error: 
> 
> 2014-07-14 14:03:47::DEBUG::common_utils::972::root:: retcode = 2
> 2014-07-14 14:03:49::DEBUG::common_utils::1477::root:: starting
> runPostgresSuQuery database: template1 query: "select 1;"
> 2014-07-14 14:03:49::DEBUG::common_utils::915::root:: Executing command -->
> '/bin/su -l postgres -c /usr/bin/psql -U postgres -d template1 -tA -c
> "select 1;"' in work
> ing directory '/etc/ovirt-engine'
> 2014-07-14 14:03:49::DEBUG::common_utils::970::root:: output =
> 2014-07-14 14:03:49::DEBUG::common_utils::971::root:: stderr = Password for
> user postgres:
> psql: fe_sendauth: no password supplied
> 
> 2014-07-14 14:03:49::DEBUG::common_utils::972::root:: retcode = 2
> 2014-07-14 14:03:51::ERROR::rhevm-dwh-setup::703::root:: Exception caught!
> 2014-07-14 14:03:51::ERROR::rhevm-dwh-setup::704::root:: Traceback (most
> recent call last):
>   File "/usr/bin/rhevm-dwh-setup", line 461, in main
>     pg_updated = utils.configHbaIdent()
>   File "/usr/share/ovirt-engine-dwh/common_utils.py", line 1448, in
> configHbaIdent
>     restartPostgres(newval=='md5')
>   File "/usr/share/ovirt-engine-dwh/common_utils.py", line 890, in
> restartPostgres
>     startPostgres()
>   File "/usr/share/ovirt-engine-dwh/common_utils.py", line 559, in
> startPostgres
>     'Error: postgresql service couldn\'t be started. Stopping.'
> RuntimeError: Error: postgresql service couldn't be started. Stopping.
> 
> 
> Version-Release number of selected component (if applicable):
> 
> From:
> rhevm-3.2.6-0.50.el6ev.noarch
> rhevm-dwh-3.2.4-1.el6ev.noarch
> 
> To:
> rhevm-3.3.4-0.53.el6ev.noarch
> rhevm-dwh-3.3.4-1.el6ev.noarch
> 
> 
> How reproducible:
> 100%
> 
> 
> Steps to Reproduce:
> 1. Install/configure latest RHEVM/DWH/REPORTS 3.2.
> 2. Run: yum update rhevm-setup rhevm-dwh rhevm-reports
> 3. Run: rhevm-setup
>  
> *Setup seems to fail with error:
>   Starting ovirt-**FILTERED**-dwhd: at Mon Jul 14 15:01:14 BRT 2014[FAILED]
> 
> 4. Start ovirt-engine anyway: service ovirt-engine start
> 5. Engine is working.
> 6. Run: rhevm-dwh-setup
> 
> * dwh-setup will not complete. Log is showing the mentioned message:
>   psql: fe_sendauth: no password supplied
> 
> 
> 
> Workaround:
> 
> Change pg_hba.conf from:
> --------------------------------------------------------------
> # TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
> 
> # "local" is for Unix domain socket connections only
> local   all         all                               md5
> # IPv4 local connections:
> host    all         all         127.0.0.1/32          md5
> # IPv6 local connections:
> host    all         all         ::1/128               md5
> --------------------------------------------------------------
> To:
> --------------------------------------------------------------
> # TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
> 
> # "local" is for Unix domain socket connections only
> local   all         all                               ident
> # IPv4 local connections:
> host    all         all         127.0.0.1/32          md5
> # IPv6 local connections:
> host    all         all         ::1/128               md5
> --------------------------------------------------------------
> 
> After the change, "rhevm-dwh-setup" will complete.

Is this reproducible? I think that if this (md5 vs ident for local) is the only change needed to fix it, it should have worked even without it. Perhaps there was some other local manual change that together with this one caused a problem.
Note that we recently fixed a related bug #1111131 (in 3.3), might be related.

Comment 11 Yedidyah Bar David 2014-07-22 06:36:10 UTC
Moving to qa, 3.5 should not be affected.

Comment 14 errata-xmlrpc 2015-02-11 18:15:46 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://rhn.redhat.com/errata/RHEA-2015-0177.html