Bug 1045846 - [DWH-SETUP] - installation failed using remote db configuration, as installer tries to upgrade
Summary: [DWH-SETUP] - installation failed using remote db configuration, as installer...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-dwh
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: 3.3.0
Assignee: Yedidyah Bar David
QA Contact: Jiri Belka
URL:
Whiteboard: integration
Depends On:
Blocks: 1026947 1039946 1043951 1043957 rhev3.3ga
TreeView+ depends on / blocked
 
Reported: 2013-12-22 14:06 UTC by Barak Dagan
Modified: 2014-03-20 14:18 UTC (History)
12 users (show)

Fixed In Version: IS30 - rhevm-dwh-3.3.0-27.el6ev.src.rpm
Doc Type: Known Issue
Doc Text:
Previously, a clean install with a remote database, wrongly behaved as an upgrade and failed. Now it correctly does a clean install.
Clone Of:
Environment:
Last Closed: 2014-01-21 15:05:18 UTC
oVirt Team: ---
Target Upstream Version:


Attachments (Terms of Use)
installation log + Default.properties before and after running the setup (3.07 KB, application/x-compressed-tar)
2013-12-22 14:06 UTC, Barak Dagan
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0036 0 normal SHIPPED_LIVE rhevm-dwh 3.3 bug fix and enhancement update 2014-01-21 19:53:35 UTC
oVirt gerrit 22701 0 None None None Never
oVirt gerrit 22840 0 None None None Never

Description Barak Dagan 2013-12-22 14:06:13 UTC
Created attachment 840347 [details]
installation log + Default.properties before and after running the setup

Description of problem:

on clean remote installation:

1) Setup refers to the installation as upgrade:# rhevm-dwh-setupWelcome to ovirt-engine-dwh setup utilityIn order to proceed the installer must stop the ovirt-engine serviceWould you like to stop the ovirt-engine service (yes|no): yesStopping ovirt-engine...                              [ DONE ]Existing DB was found on the system. ...The upgrade utility can backup the existing database....Backing up the DB...                                  [ DONE ]Upgrade DB...                                         [ ERROR ]Error encountered while installing rhevm-dwh, please consult the log file: /var/log/ovirt-engine/rhevm-dwh-setup-2013_12_22_15_42_11.log2) As credentials were not asked, in log it tried to connect with some default user: 2013-12-22 15:42:16::DEBUG::common_utils::917::root:: stderr = psql: FATAL:  password authentication failed for user "engine_history"


Version-Release number of selected component (if applicable):
is28.1 (rhevm-dwh-3.3.0-26.el6ev.noarch, rhevm-reports-3.3.0-27.el6ev.noarch) 

How reproducible:
100% (4 out of 4 tries)

Steps to Reproduce:
1. On clean rhel 6.5 install is28.1 engine
2. yum install -y rhevm-dwh rhevm-reports
3. rhevm-dwh-setup

Actual results:
installation failes

Expected results:


Additional info:

Comment 1 Yaniv Lavi 2013-12-23 12:10:25 UTC
who is the db owner?



Yaniv

Comment 2 Yaniv Lavi 2013-12-23 12:13:13 UTC
Also is this clean install?

Comment 3 Sandro Bonazzola 2013-12-23 12:37:55 UTC
Actually I'm not able to reproduce, on my system is filing in another point:

2013-12-23 13:32:37::ERROR::rhevm-dwh-setup::629::root:: Traceback (most recent call last):
  File "/usr/bin/rhevm-dwh-setup", line 481, in main
    dbExists, owned = getDBStatus(db_dict, PGPASS_TEMP)
  File "/usr/bin/rhevm-dwh-setup", line 308, in getDBStatus
    exists, owned = utils.dbExists(dbdict, TEMP_PGPASS)
  File "/usr/share/ovirt-engine-dwh/common_utils.py", line 648, in dbExists
    if rc == 0:
UnboundLocalError: local variable 'rc' referenced before assignment

Comment 4 Sandro Bonazzola 2013-12-23 13:07:39 UTC
(In reply to Sandro Bonazzola from comment #3)
> Actually I'm not able to reproduce, on my system is filing in another point:
> 
> 2013-12-23 13:32:37::ERROR::rhevm-dwh-setup::629::root:: Traceback (most
> recent call last):
>   File "/usr/bin/rhevm-dwh-setup", line 481, in main
>     dbExists, owned = getDBStatus(db_dict, PGPASS_TEMP)
>   File "/usr/bin/rhevm-dwh-setup", line 308, in getDBStatus
>     exists, owned = utils.dbExists(dbdict, TEMP_PGPASS)
>   File "/usr/share/ovirt-engine-dwh/common_utils.py", line 648, in dbExists
>     if rc == 0:
> UnboundLocalError: local variable 'rc' referenced before assignment

this is unrelated to this bug. it's exploited by using non english locale. Opened a separate bug.

Comment 5 Yaniv Lavi 2013-12-23 13:12:30 UTC
You can not use engine as db owner in 3.3 clean install of dwh and reports.



Yaniv

Comment 6 Barak Dagan 2013-12-23 13:16:24 UTC
1) db owner is: remoteuser.

create database ovirt_engine_history  template template0 encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8' owner remoteuser;

2) As can be seen from comment 1 line 4, it was on clean install.

3) engine user will not work, maybe engine_history, in that case the instructions (which are missing in this case - as it is an upgrade flow instead of installation) should be changed and require a specific user (which will fail in the field, imho).

Comment 8 Jiri Belka 2014-01-16 13:24:58 UTC
fail is32.1:

- rhevm-dwh-setup when executed on clean install for first time and doing remote install still "thinks" it is doing upgrade...

-%-
# rhevm-dwh-setup 
Welcome to ovirt-engine-dwh setup utility

In order to proceed the installer must stop the ovirt-engine service
Would you like to stop the ovirt-engine service (yes|no): yes
Stopping ovirt-engine...                              [ DONE ]
Remote installation is selected.

Remote installation selected. Make sure that DBA creates a user and the database in the following fashion:
        create role <role> with login encrypted password <password>;
        create database ovirt_engine_history template template0 encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8' owner <role>;

Provide a remote DB user:  :  [engine_history]remote_engine_history
Please choose a password for the db user: 
Warning: Weak Password.
Re-type password: 
Could not connect to remote database - please try again.

      ^^^^^^^^^^^ - ignore, i created remote db under different name (corrected later)

Remote installation selected. Make sure that DBA creates a user and the database in the following fashion:
        create role <role> with login encrypted password <password>;
        create database ovirt_engine_history template template0 encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8' owner <role>;

Provide a remote DB user:  :  [remote_engine_history]
Please choose a password for the db user: 
Warning: Weak Password.
Re-type password: 

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

^^^^^^^^^^^ - of course! rhevm-dwh-setup tells me to create it (see above for instructions for DBA)


The upgrade utility can backup the existing database. The time and space required for the database backup depend on its size. The detected DB size is 5 MB. This process takes time, and in some cases (for instance, when the size is few GBs) may take few hours to complete. Would you like to continue and backup the existing database?
Answering "no" will skip the backup step and continue the upgrade without backing up the database (yes|no):
-%-

It should not talk about any upgrade at all if I'm doing clean remote install.

Comment 9 Jiri Belka 2014-01-16 13:30:20 UTC
The BZ is about failure, not about 'upgrade' info in output.

is32.2 it passed OK.

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

The upgrade utility can backup the existing database. The time and space required for the database backup depend on its size. The detected DB size is 5 MB. This process takes time, and in some cases (for instance, when the size is few GBs) may take few hours to complete. Would you like to continue and backup the existing database?
Answering "no" will skip the backup step and continue the upgrade without backing up the database (yes|no): yes
Are you sure you would like to continue and backup database ovirt_engine_history?
Answering "no" will stop the upgrade (yes|no): yes
Backing up the DB...                                  [ DONE ]
The DB was backed up as '/var/lib/ovirt-engine/backups/ovirt-engine-history.backup.2014_01_16_14_25_29'
The DB backup was created with compression. You must use "pg_restore" command if you need to recover the DB from the backup.
Creating DB...                                        [ DONE ]
Setting DB connectivity...                            [ DONE ]
Starting ovirt-engine...                              [ DONE ]
Starting oVirt-ETL...                                 [ DONE ]
Successfully installed rhevm-dwh.
The installation log file is available at: /var/log/ovirt-engine/rhevm-dwh-setup-2014_01_16_14_16_12.log

Comment 11 errata-xmlrpc 2014-01-21 15:05:18 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.

http://rhn.redhat.com/errata/RHBA-2014-0036.html


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