Bug 1416459 - Restore HE backup will fail if the HE SD has disks of non-HE VM's
Summary: Restore HE backup will fail if the HE SD has disks of non-HE VM's
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Backup-Restore.Engine
Version: 4.1.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ovirt-4.1.1
: 4.1.1.3
Assignee: Simone Tiraboschi
QA Contact: Artyom
URL:
Whiteboard:
Depends On:
Blocks: 1235200 1425893
TreeView+ depends on / blocked
 
Reported: 2017-01-25 14:43 UTC by Artyom
Modified: 2017-04-21 09:44 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
: 1425893 (view as bug list)
Environment:
Last Closed: 2017-04-21 09:44:01 UTC
oVirt Team: Integration
Embargoed:
rule-engine: ovirt-4.1+
ylavi: exception+
nsednev: testing_plan_complete?


Attachments (Terms of Use)
restore log (11.59 KB, text/plain)
2017-01-25 14:43 UTC, Artyom
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 72801 0 master MERGED he_restore: avoid failing on other VMs disks 2017-02-23 10:58:41 UTC
oVirt gerrit 72803 0 ovirt-engine-4.1 MERGED he_restore: avoid failing with other VM disks 2017-02-23 11:20:01 UTC
oVirt gerrit 72806 0 ovirt-engine-4.0 POST he_restore: avoid failing with on other VM disks 2017-02-21 17:04:12 UTC
oVirt gerrit 72920 0 ovirt-engine-4.1.1.z MERGED he_restore: avoid failing with other VM disks 2017-02-23 09:28:16 UTC

Description Artyom 2017-01-25 14:43:35 UTC
Created attachment 1244274 [details]
restore log

Description of problem:
Restore HE backup will fail if the HE SD has disks of non-HE VM's

Version-Release number of selected component (if applicable):
rhevm-4.1.0.2-0.2.el7.noarch

How reproducible:
Always

Steps to Reproduce:
1. Deploy HE environment
2. Add the storage domain to the engine(to start auto-import process)
3. Wait until the engine will have HE VM
4. Add non-HE VM with the disk on the HE SD
5. Set global maintenance
6. Backup the engine: # engine-backup --mode=backup --file=engine.backup --log=engine-backup.log
7. Copy the backup file from the HE VM to the host
8. Clean host from HE deploy(reprovisioning)
9. Run the HE deployment again
10. Answer No on the question "Automatically execute engine-setup on the engine appliance on first boot (Yes, No)[Yes]? "
11. Enter to the HE VM and copy the backup file from the host to the HE VM
12. Run restore command: # engine-backup --mode=restore --scope=all --file=engine.backup --log=engine-restore.log  --he-remove-storage-vm --he-remove-hosts --restore-permissions --provision-all-databases

Actual results:
Restore operation failed with the error:
SELECT DeleteHostedEngineStorageVM();
ERROR:  The hosted-engine storage domain contains more than one vm.
FATAL: Cannot execute sql command: --command=SELECT DeleteHostedEngineStorageVM();
2017-01-25 09:25:05 9460: FATAL: Failed cleaning hosted-engine

Expected results:
Restore operation succeeds.
I do not sure what the correct way to fix this problem(maybe we just need to prevent adding non-HE VM disks on the HE SD)

Additional info:

Comment 1 Yaniv Lavi 2017-02-15 13:54:47 UTC
Let's remove the other disks from the SD during restore and prompt that we have done so for this use case. This because its not the same physical device.

Comment 3 Artyom 2017-03-26 07:17:35 UTC
Verified on rhevm-4.1.1.6-0.1.el7.noarch


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