Bug 1072466 - [RHEV] Upgrading rhevm-reports from 3.2 to 3.3 without Apache running fails and prevents any future rhevm-reports-setup from succeeding
Summary: [RHEV] Upgrading rhevm-reports from 3.2 to 3.3 without Apache running fails a...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-reports
Version: 3.3.0
Hardware: All
OS: Linux
unspecified
urgent
Target Milestone: ---
: 3.3.2
Assignee: Yedidyah Bar David
QA Contact: Barak Dagan
URL:
Whiteboard: integration
Depends On: 1071020
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-04 15:58 UTC by rhev-integ
Modified: 2019-04-28 10:07 UTC (History)
13 users (show)

Fixed In Version: is35 - rhevm-reports-3.3.2-1.el6ev.noarch.rpm
Doc Type: Bug Fix
Doc Text:
Previously, if the rhevm-reports-setup command failed, after upgrading reports from version 3.2 to version 3.3, it would exit before writing to the 10-setup-database.conf file, resulting in a new engine_reports user being created with a random password and preventing the rhevm-reports-setup command from succeeding in the future. Now, the writing of credentials is performed earlier in the setup process, ensuring that credentials are correctly written even in the event of a failure, thus letting the user to try and run it again.
Clone Of: 1071020
Environment:
Last Closed: 2014-04-09 18:54:08 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
reports setup log (28.48 KB, application/x-compressed-tar)
2014-03-19 19:27 UTC, Barak Dagan
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 740763 0 None None None Never
Red Hat Product Errata RHBA-2014:0393 0 normal SHIPPED_LIVE rhevm-reports 3.3.2 bug fix update 2014-04-09 22:53:18 UTC
oVirt gerrit 25339 0 None None None Never

Comment 1 Yedidyah Bar David 2014-03-04 16:17:21 UTC
Would this be enough for 3.3?

Comment 2 James W. Mills 2014-03-04 16:28:38 UTC
Yes, that would definitely help a great deal.  Since reporting this bug I have run into several other instances of something failing between the PW generation and the conf file writing.  This will go a long way toward helping folks recover from a failure.

Thanks!
~james

Comment 5 Barak Dagan 2014-03-19 19:25:53 UTC
Verified on 3.3.2 (is35):


# service httpd stop
Stopping httpd:          

                                  [  OK  ]
... === ...

[ INFO  ] Stage: Initializing
         
          Welcome to the RHEV 3.3.2 upgrade.
          Please read the following knowledge article for known issues and updated instructions before proceeding with the upgrade.
          RHEV 3.3.2 Upgrade Guide: Tips, Considerations and Roll-back Issues
              https://access.redhat.com/site/articles/408623
          Would you like to continue with the upgrade? (Yes, No) [Yes]: yes

... === ...
# service httpd stop
Stopping httpd:                                            [  OK  ]
 
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
 ...
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 19 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

... === ...
# service httpd status
httpd is stopped

Welcome to rhevm-reports 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
 ...
Return Code is not zero
Error encountered while installing rhevm-reports, please consult the log file: /var/log/ovirt-engine/ovirt-engine-reports-setup-2014_03_19_20_40_00.log
[root@fire32-rep yum.repos.d]# less /var/log/ovirt-engine/ovirt-engine-reports-setup-2014_03_19_20_40_00.log

log:
2014-03-19 20:54:00::DEBUG::rhevm-reports-setup::912::root:: downloading certificates https://fire32-rep.scl.lab.tlv.redhat.com:443
...  File "<string>", line 1, in connect
socket.error: [Errno 111] Connection refused
...
    raise Exception(msg)
Exception: Return Code is not zero

Comment 6 Barak Dagan 2014-03-19 19:27:33 UTC
Created attachment 876574 [details]
reports setup log

Comment 7 Yedidyah Bar David 2014-03-20 08:51:31 UTC
Barak - please see end of description (copied from comment 4 of bug #1071020) for the solution and how to test it. I only fixed the second part of the summary - "and prevents any future rhevm-reports-setup from succeeding".

Comment 8 Barak Dagan 2014-03-20 10:45:25 UTC
(In reply to Yedidyah Bar David from comment #7)
> Barak - please see end of description (copied from comment 4 of bug
> #1071020) for the solution and how to test it. I only fixed the second part
> of the summary - "and prevents any future rhevm-reports-setup from
> succeeding".

Continue verification:

# locate database.conf
/etc/ovirt-engine/engine.conf.d/10-setup-database.conf
/etc/ovirt-engine-dwh/ovirt-engine-dwhd.conf.d/10-setup-database.conf
/etc/ovirt-engine-reports/ovirt-engine-reports.conf.d/10-setup-database.conf


# service httpd start
Starting httpd:                                            [  OK  ]

# rhevm-reports-setup 

Welcome to rhevm-reports 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 ]
Backing up reports DB...                              [ DONE ]
Editing XML files...                                  [ DONE ]
Setting DB connectivity...                            [ DONE ]
Backing up Installation...                            [ DONE ]
Updating DB Schema...                                 [ DONE ]
Exporting adhoc reports...                            [ DONE ]
Exporting scheduled reports...                        [ DONE ]
Exporting current users...                            [ DONE ]
Deploying Server...                                   [ DONE ]
Updating Redirect Servlet...                          [ DONE ]
Importing current users...                            [ DONE ]
Importing adhoc reports...                            [ DONE ]
Importing reports...                                  [ DONE ]
Importing current users...                            [ DONE ]
Customizing Server...                                 [ DONE ]
Importing scheduled reports...                        [ DONE ]
Running post setup steps...                           [ DONE ]
Starting ovirt-engine...                              [ DONE ]
Restarting httpd...                                   [ DONE ]
Succesfully installed rhevm-reports.
The installation log file is available at: /var/log/ovirt-engine/ovirt-engine-reports-setup-2014_03_20_12_24_36.log


In that case it is verified.

Comment 9 Zac Dover 2014-04-03 03:10:26 UTC
This bug is currently attached to errata RHBA-2014:17207 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.

Comment 10 Yedidyah Bar David 2014-04-08 05:03:53 UTC
Changed the doctext to not mention apache, as we did not deal with it.

Comment 11 errata-xmlrpc 2014-04-09 18:54:08 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-0393.html


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