Bug 1649001

Summary: Repeated re-deploy from the backup fails since master storage domain is lost from the db
Product: [oVirt] ovirt-engine Reporter: Polina <pagranat>
Component: BLL.HostedEngineAssignee: Doron Fediuck <dfediuck>
Status: CLOSED DUPLICATE QA Contact: meital avital <mavital>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.2.7.1CC: bugs, michal.skrivanek, rbarry, stirabos
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-13 09:21:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Polina 2018-11-12 16:54:26 UTC
Description of problem:
   1. take a backup
   2. redeploy once creating a new master SD
   3. try to redeploy a second time with the backup took before master SD creation

Version-Release number of selected component (if applicable):ovirt-hosted-engine-setup-2.2.32-1.el7ev.noarch.rpm

How reproducible:100%

Steps to Reproduce:
1. on all 3 hosts:

yum install http://download.eng.bos.redhat.com/brewroot/packages/ovirt-hosted-engine-setup/2.2.32/1.el7ev/noarch/ovirt-hosted-engine-setup-2.2.32-1.el7ev.noarch.rpm

2. 
[root@compute-ge-he-4 ~]# engine-backup --mode=backup --file=backup_compute-he-4 --log=log_compute-he-4_backup4.2

3. Copy aside
4. Insert environment into global maintenance. hosted-engine --set-maintenance --mode=global

5. Cleanup HE Storage NFS Domain.
rm -Rf /Compute_NFS/pagranat/compute-ge-he-4 on yellow-vdsb.qa.lab.tlv.redhat.com

6. Reprovisioning HE host . Copy repos to /etc/yum.repos.d/, yum update -y , update iscsi.initiator
   
   yum install http://download.eng.bos.redhat.com/brewroot/packages/ovirt-hosted-engine-setup/2.2.32/1.el7ev/noarch/ovirt-hosted-engine-setup-2.2.32-1.el7ev.noarch.rpm

7. Redeploy once creating a new master SD
   copy backup file to the host and run 
   hosted-engine --deploy --restore-from-file=backup_compute-he-4 (give the NEW storage path yellow-vdsb.qa.lab.tlv.redhat.com:/Compute_NFS/pagranat/compute-ge-he-4-backup-restore)

8. try to redeploy a second time with the backup taken before master SD creation

Actual results:
re-deploy fails 
"[Failed to attach Storage due to an error on the Data Center master Storage Domain.\n-Please activate the master Storage Domain first.]\". HTTP response code is 409."

Expected results: re-deploy succeeded


Additional info:

Comment 1 Ryan Barry 2018-11-13 03:32:20 UTC
Simone, this appears to be part of the HE flow, and doesn't appear to be related to virt. Care to take it?

Comment 3 Simone Tiraboschi 2018-11-13 09:20:21 UTC
(In reply to Ryan Barry from comment #1)
> Simone, this appears to be part of the HE flow, and doesn't appear to be
> related to virt. Care to take it?

Absolutely.

Comment 4 Simone Tiraboschi 2018-11-13 09:21:57 UTC
This looks like just another instance of the more general https://bugzilla.redhat.com/show_bug.cgi?id=1648987

I think that the general solution proposed in https://bugzilla.redhat.com/show_bug.cgi?id=1648987#c5 could correctly address this one as well.

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