Bug 1007554 - rhevm-setup uninstalls rhevm on failure if user chose to continue with inability to rollback
rhevm-setup uninstalls rhevm on failure if user chose to continue with inabil...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-setup (Show other bugs)
3.2.0
All Linux
medium Severity medium
: ---
: 3.2.4
Assigned To: Alon Bar-Lev
sefi litmanovich
integration
: ZStream
Depends On: 1002804
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-12 14:26 EDT by rhev-integ
Modified: 2014-11-04 02:43 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
When rhevm-setup did not execute successfully, yum attempted to roll back to a previously installed version, but it erased packages that could not be rolled back. This update disables yum rollback if no rollback is available.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-25 14:43:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 18808 None None None Never
oVirt gerrit 18958 None None None Never
oVirt gerrit 18979 None None None Never

  None (edit)
Description rhev-integ 2013-09-12 14:26:59 EDT
+++ This bug is a RHEV-M zstream clone. The original bug is: +++
+++   https://bugzilla.redhat.com/show_bug.cgi?id=1002804. +++

======================================================================



----------------------------------------------------------------------
Following comment by thildred@redhat.com on August 30 at 04:23:41, 2013

Created attachment 792008 [details]
rhevm gets completely uninstalled after failed rhevm-setup.

Description of problem:
I was messing around with manually configured db, and had the postgresql service running when I ran rhevm-setup. 

rhevm-setup discovered that there were new packages, and asked if I wanted to download them. I said yes.

rhevm-setup downloaded the new packages, verified them, and proceeded into the installation. I selected automatic db setup. 


rhevm-setup discovered couldn't start and connect to postgres service, because it was already running.

rhevm-setup did a yum-rollback (even though it had warned me previously that yum-rollback would not be possible) on the packages it tried to update, which actually uninstalled all of the rhevm packages. 


rhevm-setup should not result in your packages being removed.

----------------------------------------------------------------------
Following comment by alonbl@redhat.com on September 01 at 09:59:40, 2013

Hi Tim,

I will love to get: /var/log/ovirt-engine/setup/ovirt-engine-setup-20130830140120.log, as I do want to understand why postgresql connection did not succeed, I hope there will be more information in the log.

For the packages...

          Setup will not be able to rollback new packages in case of a failure, because installed ones were not found in enabled repositories.
          Do you want to abort Setup? (Yes, No) [Yes]: No 

As it tries to rollback transaction, it erases the new packages but unable to install the previous ones.

Difficult one.

Should we leave the upgraded packages that are incompatible? Should we not allow continue if rollback is missing? Or should we attempt to rollback as much as possible?

----------------------------------------------------------------------
Following comment by thildred@redhat.com on September 02 at 04:08:26, 2013

(In reply to Alon Bar-Lev from comment #1)
> Hi Tim,
> 
> I will love to get:
> /var/log/ovirt-engine/setup/ovirt-engine-setup-20130830140120.log, as I do
> want to understand why postgresql connection did not succeed, I hope there
> will be more information in the log.

Ok, I'll add an attachment

> As it tries to rollback transaction, it erases the new packages but unable
> to install the previous ones.
> 
> Difficult one.
> 
> Should we leave the upgraded packages that are incompatible? Should we not
> allow continue if rollback is missing? Or should we attempt to rollback as
> much as possible?

What about a message that says "An error during database creation interrupted rhevm-setup (is the postgresql service already running?). Correct the error, and run the rhevm-setup script again."

Or alternatively:
"rhevm-setup failed due to an error. Would you like to remove the updates you already downloaded? Yes or No [No]: Yes
 
WARNING, this may remove your previously installed Red Hat Enterprise Virtualization Manager packages. Are you sure you want to continue? Yes or No [No]:"

----------------------------------------------------------------------
Following comment by thildred@redhat.com on September 02 at 04:09:10, 2013

Created attachment 792710 [details]
requested log file.

----------------------------------------------------------------------
Following comment by alonbl@redhat.com on September 07 at 23:00:24, 2013

commit 54c67f91ad7cb3880812fb89834d273fd2cc42e4
Author: Alon Bar-Lev <alonbl@redhat.com>
Date:   Sun Sep 8 00:43:07 2013 +0300

    packaging: setup: disable yum transaction rollback if no rollback is available
    
    rhel yum does not downgrade on rollback but erase and install, this
    cause packages that cannot be rollbacked to be actually erased.
    
    Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1002804
    Change-Id: Ie3f868a84453e6e58de173e57a280fc51b5e9dd1
    Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>

----------------------------------------------------------------------
Following comment by alonbl@redhat.com on September 10 at 19:13:30, 2013

Itamar, I suggest to have this also in 3.2.z
Comment 4 sefi litmanovich 2013-10-10 10:19:53 EDT
Verified upgrading from rhevm 3.2 sf20.3 to sf21
Comment 6 errata-xmlrpc 2013-10-25 14:43:49 EDT
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-2013-1468.html

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