Bug 1027894 - [rhevm-dwh] When first setup fails, there's no way to setup it again
[rhevm-dwh] When first setup fails, there's no way to setup it again
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-dwh (Show other bugs)
3.3.0
x86_64 Linux
unspecified Severity unspecified
: ---
: 3.3.0
Assigned To: Alex Lourie
Barak Dagan
integration
: Triaged
Depends On: 1027378
Blocks: 3.3snap2
  Show dependency treegraph
 
Reported: 2013-11-07 08:15 EST by David Caro
Modified: 2016-06-26 19:50 EDT (History)
10 users (show)

See Also:
Fixed In Version: IS23 - rhevm-dwh-3.3.0-21.el6ev.noarch.rpm
Doc Type: Bug Fix
Doc Text:
To set up rhevm-dwh after the first attempt is unsuccessful, follow the instructions here: https://access.redhat.com/site/solutions/291973
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-17 19:24:37 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
last setup log (13.67 KB, text/x-log)
2013-11-07 08:15 EST, David Caro
no flags Details
dwh setup logs (3.10 KB, application/x-tar-gz)
2013-11-14 15:35 EST, Barak Dagan
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 291973 None None None Never
oVirt gerrit 21064 None None None Never

  None (edit)
Description David Caro 2013-11-07 08:15:59 EST
Created attachment 821099 [details]
last setup log

Description of problem:
Failed to setup data warehouse after first attempt failed

Version-Release number of selected component (if applicable):
3.3.0-19.el6ev



How reproducible:
When setting up data warehouse for the first time, make it fail (it failed with unable to connect to postgres error for us). Then any other attempt to install will fail, even following the steps here:
https://access.redhat.com/site/solutions/291973


Steps to Reproduce:
1.Make first dwh setup fail
2.Try to setup again
3.

Actual results:
Unable to setup due to postgres database issues


Expected results:
DWH installed correctly

Additional info:
Comment 3 Barak Dagan 2013-11-14 15:34:18 EST
Verification failed on IS23, rhevm-dwh-3.3.0-21.el6ev.noarch:

Step 1:
======
# rhevm-dwh-setup 
Welcome to ovirt-engine-dwh setup utility


This utility can configure a read only user for DB access. Would you like to do so? (yes|no): yes
Provide a username for read-only user : rro
Provide a password for read-only user: 
Warning: Weak Password.
Re-type password: 
Should postgresql be setup with secure connection? (yes|no): no
Creating DB...                                        [ DONE ]
Creating read-only user...^C Error encountered while installing rhevm-dwh, please consult the log file: /var/log/ovirt-engine/rhevm-dwh-setup-2013_11_15_01_00_59.log

Step 2:
======
# rhevm-dwh-setup 
Welcome to ovirt-engine-dwh setup utility


This utility can configure a read only user for DB access. Would you like to do so? (yes|no): yes
Provide a username for read-only user : rro
Provide a password for read-only user: 
Warning: Weak Password.
Re-type password: 
Should postgresql be setup with secure connection? (yes|no): no

Existing DB was found on the system. The size of the detected DB is 19 MB, free space in the backup folder /var/lib/ovirt-engine/backups is approximately 6.0 GB. 
...

Answering "no" will skip the backup step and continue the upgrade without backing up the database (yes|no): no
Are you sure you would like to continue and SKIP the backup of the database ovirt_engine_history?
Answering "no" will stop the upgrade (yes|no): yes
Upgrade DB...                                         [ DONE ]
Creating read-only user...                            [ ERROR ]
Error encountered while installing rhevm-dwh, please consult the log file: /var/log/ovirt-engine/rhevm-dwh-setup-2013_11_15_01_01_39.log


step 3 (https://access.redhat.com/site/solutions/291973):
======
A) yum remove rhevm-dwh
....
  Erasing    :rhevmreports-.3.0-20.el6ev.noarch
  Erasing    : rhevm-dwh-3.3.0-21.el6ev.noarch

B) #dropdb -U postgres ovirt_engine_history
dropdb: could not connect to database postgres: FATAL:  Ident authentication failed for user "postgres"

using (https://bugzilla.redhat.com/show_bug.cgi?id=1027378) solution:
su postgres -c 'dropdb ovirt_engine_history'
su postgres -c 'psql -l'
                                   List of databases
    Name     |  Owner   | Encoding |  Collation  |    Ctype    |   Access privileges   
-------------+----------+----------+-------------+-------------+-----------------------
 engine      | engine   | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 engine_test | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 postgres    | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
 template0   | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
                                                               : postgres=CTc/postgres
 template1   | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
                                                               : postgres=CTc/postgres
(5 rows)

C) #yum install rhevm-reports rhevm-dwh
Installed:  rhevm-dwh.noarch 0:3.3.0-21.el6ev   
            rhevm-reports.noarch 0:3.3.0-20.el6ev


step 4:
======
# rhevm-dwh-setup 
Welcome to ovirt-engine-dwh setup utility


This utility can configure a read only user for DB access. Would you like to do so? (yes|no): yes
Provide a username for read-only user : rro
Provide a password for read-only user: 
Warning: Weak Password.
Re-type password: 
Should postgresql be setup with secure connection? (yes|no): no
Error encountered while installing rhevm-dwh, please consult the log file: /var/log/ovirt-engine/rhevm-dwh-setup-2013_11_15_01_19_33.log
Comment 4 Barak Dagan 2013-11-14 15:35:08 EST
Created attachment 824141 [details]
dwh setup logs
Comment 5 Alex Lourie 2013-11-17 09:39:14 EST
We need to update the KB for this case.

The addition should be:

After removing ovirt_engine_history DB, also remove the 'engine_history' user by executing:

su postgres -c "psql \"drop role engine_history;\""

Yaniv, who should we move this to?
Comment 6 Yaniv Lavi 2013-11-17 11:33:44 EST
Bryan, can you please update the kbase for 3.3 setup. See comment #5. 
https://access.redhat.com/site/solutions/291973

You can close the bug after this is done.


Thanks!
Yaniv
Comment 7 Bryan Yount 2013-11-17 19:11:13 EST
(In reply to Yaniv Dary from comment #6)
> Bryan, can you please update the kbase for 3.3 setup. See comment #5. 
> https://access.redhat.com/site/solutions/291973
> 
> You can close the bug after this is done.
> 
> 
> Thanks!
> Yaniv

Yaniv, I have updated the kbase. I added what I assumed the step was for RHEV 3.0 as well. Let me know if "step 3" looks correct for both RHEV 3.0 and RHEV 3.1+?
Comment 8 Yaniv Lavi 2013-11-17 19:15:26 EST
(In reply to Bryan Yount from comment #7)
> (In reply to Yaniv Dary from comment #6)
> > Bryan, can you please update the kbase for 3.3 setup. See comment #5. 
> > https://access.redhat.com/site/solutions/291973
> > 
> > You can close the bug after this is done.
> > 
> > 
> > Thanks!
> > Yaniv
> 
> Yaniv, I have updated the kbase. I added what I assumed the step was for
> RHEV 3.0 as well. Let me know if "step 3" looks correct for both RHEV 3.0
> and RHEV 3.1+?

Don't make any changes other than in the 3.3 version.
This is not needed in pervious versions.


Yaniv
Comment 9 Bryan Yount 2013-11-17 19:24:37 EST
(In reply to Yaniv Dary from comment #8)
> Don't make any changes other than in the 3.3 version.
> This is not needed in pervious versions.

Ok, fixed. Double-check my work. Thanks! Closing BZ as requested.
Comment 10 Charlie 2013-11-27 19:53:44 EST
This bug is currently attached to errata RHEA-2013:15116. If this change is not to be documented in the text for this errata please either remove it from the errata, set the requires_doc_text flag to 
minus (-), or leave a "Doc Text" value of "--no tech note required" if you do not have permission to alter the flag.

Otherwise to aid in the development of relevant and accurate release documentation, please fill out the "Doc Text" field above with these four (4) pieces of information:

* Cause: What actions or circumstances cause this bug to present.
* Consequence: What happens when the bug presents.
* Fix: What was done to fix the bug.
* Result: What now happens when the actions or circumstances above occur. (NB: this is not the same as 'the bug doesn't present anymore')

Once filled out, please set the "Doc Type" field to the appropriate value for the type of change made and submit your edits to the bug.

For further details on the Cause, Consequence, Fix, Result format please refer to:

https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes 

Thanks in advance.

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