Bug 1396193 - Hosted Engine upgrade is failing during engine-setup if the db backup file is not in /root/
Summary: Hosted Engine upgrade is failing during engine-setup if the db backup file is...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-hosted-engine-setup
Classification: oVirt
Component: Plugins.General
Version: 2.0.3.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.0.6
: 2.0.4.1
Assignee: Simone Tiraboschi
QA Contact: sefi litmanovich
URL:
Whiteboard:
Depends On:
Blocks: 1394740 1396051
TreeView+ depends on / blocked
 
Reported: 2016-11-17 17:25 UTC by sefi litmanovich
Modified: 2017-05-11 09:24 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-01-18 07:26:17 UTC
oVirt Team: Integration
Embargoed:
rule-engine: ovirt-4.0.z?
rule-engine: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 67021 0 None None None 2016-11-17 17:25:12 UTC
oVirt gerrit 67126 0 master MERGED upgrade: fixing engine backup location if not /root 2016-11-28 10:49:42 UTC
oVirt gerrit 67419 0 ovirt-hosted-engine-setup-2.0 MERGED upgrade: fixing engine backup location if not /root 2016-11-28 15:41:09 UTC

Description sefi litmanovich 2016-11-17 17:25:12 UTC
Description of problem:
When running hosted-engine --upgrade-appliance a backup is created by the user and copied to the host in order to later copy it back to the new appliance instance. The path to the backup file in the host that is given by the user in the dialog is later used when running the restore cmd in the new appliance.
But when copying the backup file from the host to the appliance it is always copied to /root/{file_name} therefore failing the restore cmd that doesn't find the backup file. 

Version-Release number of selected component (if applicable):
ovirt-hosted-engine-setup-2.0.3-2.el7ev.noarch

How reproducible:
always

Steps to Reproduce:
1. have a HE 3.6 running.
2. Update the host's repos for 4.0
3. Put HE to global maintenance mode
4. install latest 4.0 appliance on the host
5. run hosted-engine --upgrade-appliance
6. During the process ssh to the engine and create a backup using engine-backup tool.
7. copy the backup file to some path in the host (different than /root/)
8. proceed with upgrade flow and when asked give the path to the backup file on the host.

Actual results:
At the engine-backup --mode=restore phase, the upgrade will fail in the setup log we get:

2016-11-17 12:38:57 INFO otopi.plugins.gr_he_common.engine.health health._closeup:130 Running engine-setup on the appliance
2016-11-17 12:39:17 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND                 |- FATAL: /var/tmp/engine_backup.tar.gz does not exist
2016-11-17 12:39:17 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:204 DIALOG:SEND                 |- HE_APPLIANCE_ENGINE_RESTORE_FAIL
2016-11-17 12:39:17 ERROR otopi.plugins.gr_he_common.engine.health health._closeup:157 Engine backup restore failed on the appliance
2016-11-17 12:39:17 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-common/engine/health.py", line 161, in _closeup
    'engine-backup failed restoring the engine backup '
RuntimeError: engine-backup failed restoring the engine backup on the appliance
Please check its log on the appliance.

2016-11-17 12:39:17 ERROR otopi.context context._executeMethod:151 Failed to execute stage 'Closing up': engine-backup failed restoring the engine backup on the appliance
Please check its log on the appliance.


Expected results:
The backup file is created in the same path that was given in the host.
Another option is to make sure the restore cmd always look for the path /root/{file_name}

Additional info:

Comment 1 sefi litmanovich 2016-12-06 14:28:34 UTC
Verified on ovirt-hosted-engine-setup-2.0.4.1-2.el7ev.noarch.


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