Bug 1382546

Summary: After failed 'hosted-engine --upgrade-appliance', rollback does not remove failed attempt
Product: Red Hat Enterprise Virtualization Manager Reporter: Marcus West <mwest>
Component: ovirt-hosted-engine-setupAssignee: Simone Tiraboschi <stirabos>
Status: CLOSED DUPLICATE QA Contact: meital avital <mavital>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.0.3CC: gklein, lsurette, stirabos, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-13 15:59:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Marcus West 2016-10-07 04:11:46 UTC
## Description of problem:

After failed 'hosted-engine --upgrade-appliance', rollback does not remove failed attempt

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

ovirt-hosted-engine-setup-2.0.2.2-2.el7ev.noarch

## How reproducible:
1/1 for me (iscsi storage)

## Steps to Reproduce:
1. do failed upgrade (3.6 to 4.0) - 120GB for HE storage domain
2. successfully roll back
3. try and update again

## Actual results:

2nd attempt to update fails with this error:

2016-10-04 16:03:41 ERROR otopi.plugins.gr_he_upgradeappliance.engine.misc misc._check_sd_and_disk_space:223 On the hosted-engine storage domain there is not enough available space to create a new disk for backup purposes and eventually extend the current disk to fit the new appliance: required 50GiB - available 13GiB. Please extend the hosted-engine storage domain.
2016-10-04 16:03:41 DEBUG otopi.context context._executeMethod:142 method exception
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/otopi/context.py", line 132, in _executeMethod
    method['method']()
  File "/usr/share/ovirt-hosted-engine-setup/scripts/../plugins/gr-he-upgradeappliance/engine/misc.py", line 227, in _check_sd_and_disk_space
    'Not enough free space on the hosted-engine storage domain'
RuntimeError: Not enough free space on the hosted-engine storage domain
2016-10-04 16:03:41 ERROR otopi.context context._executeMethod:151 Failed to execute stage 'Environment customization': Not enough free space on the hosted-engine storage domain


## Expected results:

It would be good hosted-engine removed the previous failed attempt.  I don't think it's reasonable to keep extending the HE storage domain each time there is a failed attempt.  At the least, output the unused lv's so that they can be deleted.

## Additional info:

I was able to figure out the lvm to delete, but I wouldn't expect a regular user to be able to do this.  There's also a huge potential here to remove the wrong lv...

Comment 3 Simone Tiraboschi 2016-10-10 09:57:09 UTC
The user can delete the backup disks from the engine.
The backup disks are labeled 'hosted-engine-backup-' so they can be easily recognized.

Comment 4 Marcus West 2016-10-11 00:26:21 UTC
Do you mean via the gui?  At this stage, the upgrade (or initial install) has not been successful.  For an upgrade, we could roll back to access the gui, but this can be quite time consuming (BZ#1382543)

Comment 5 Simone Tiraboschi 2016-10-11 07:30:18 UTC
(In reply to Marcus West from comment #4)
> Do you mean via the gui?  At this stage, the upgrade (or initial install)
> has not been successful.  For an upgrade, we could roll back to access the
> gui, but this can be quite time consuming (BZ#1382543)

Either the GUI and the API.
Yes, if the upgrade was not successfully you have to rollback to regain a working engine and remove from there.

Comment 6 Sandro Bonazzola 2016-10-13 08:07:15 UTC
Simone, since this is by design, can we close this as not a bug? Or do we need to change documentation?

Comment 7 Simone Tiraboschi 2016-10-13 15:59:50 UTC
(In reply to Sandro Bonazzola from comment #6)
> Simone, since this is by design, can we close this as not a bug? Or do we
> need to change documentation?

We are adding it to our documentation,
please see: https://bugzilla.redhat.com/show_bug.cgi?id=1380896#c10

*** This bug has been marked as a duplicate of bug 1380896 ***