Bug 1645757

Summary: VMs running on the deployed host are removed from the engine after backup/restore
Product: [oVirt] ovirt-hosted-engine-setup Reporter: Polina <pagranat>
Component: GeneralAssignee: Simone Tiraboschi <stirabos>
Status: CLOSED CURRENTRELEASE QA Contact: Polina <pagranat>
Severity: high Docs Contact:
Priority: unspecified    
Version: 2.2.24CC: bugs, mkalinin, nsednev, pagranat, rbarry, stirabos
Target Milestone: ovirt-4.2.7-1Flags: rule-engine: ovirt-4.2+
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-hosted-engine-setup-2.2.32-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-13 16:12:27 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1644784    
Attachments:
Description Flags
engine and ovirt-hosted-engine-setup logs attached
none
screenshot of environment before backup none

Description Polina 2018-11-03 12:51:47 UTC
Created attachment 1500872 [details]
engine and ovirt-hosted-engine-setup logs attached

Description of problem: VMs running of the host where the 'hosted-engine --deploy --restore-from-file=backup_file' is performed are removed from the environment after the deploy completed.

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

How reproducible:100%

Steps to Reproduce:
Pre-condition: 
   three hosts in the environment . No Power Management
   VMs are up on host1 : 
      HE VM 
      High Performance VM golden_env_mixed_virtio_1_1.
      High Available with lease VM golden_env_mixed_virtio_1_0.
      VM with iscsi disk golden_env_mixed_virtio_2_0.

     Four VMs run on host3:
        test_2gluster_2iscs
         test_2nfs_2iscsi_disks
          test_4iscsi_disks
           test_4nfs_disks

Test Steps:
1. on all 3 hosts:
yum install http://download.eng.bos.redhat.com/brewroot/packages/ovirt-hosted-engine-setup/2.2.31/1.el7ev/noarch/ovirt-hosted-engine-setup-2.2.31-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
Backing up:
Notifying engine
- Files
- Engine database 'engine'
- DWH database 'ovirt_engine_history'
Packing into file 'backup_compute-he-4'
Notifying engine
Done.

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 , 
   yum install  http://download.eng.bos.redhat.com/brewroot/packages/ovirt-hosted-engine-setup/2.2.31/1.el7ev/noarch/ovirt-hosted-engine-setup-2.2.31-1.el7ev.noarch.rpm
   fix the /etc/iscsi/initiator.iscsi

7. 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_restored )

Actual results: The VMs run on host1 are removed from the environment. their disks are existent.


Expected results: the environment restored with all the VMs


Additional info: engine and ovirt-hosted-engine-setup logs attached

Comment 1 Ryan Barry 2018-11-04 06:03:44 UTC
Were these VMs present before the backup?

Comment 2 Polina 2018-11-04 07:23:35 UTC
Created attachment 1501214 [details]
screenshot of environment before backup

Yes, the VMs were running in the environment before the backup. Please see 'Pre-condition' section before the 'Test Steps:'.
I also attach a screenshot of the environment before backup.

Comment 3 Simone Tiraboschi 2018-11-04 10:48:06 UTC
We are strongly recommending to perform the restore on a spare host that wasn't part of the original environment.
In that case the user is not going to face this issue.

Comment 4 Nikolai Sednev 2018-11-11 16:05:31 UTC
Worked for me on these components:
ovirt-hosted-engine-setup-2.2.32-1.el7ev.noarch
ovirt-hosted-engine-ha-2.2.18-1.el7ev.noarch

I've tested on environment where one guest VM was running on reprovisioned ha-host with the engine VM and second guest VM was running on first ha-host.

Both guest VMs remained after restore and one of them was still running on the untouched ha-host.
Plese consider moving to verified.

Comment 5 Polina 2018-11-13 12:54:41 UTC
Verified on ovirt-hosted-engine-setup-2.2.32-1.el7ev.noarch.rpm according to the Description Steps.

Comment 6 Sandro Bonazzola 2018-11-13 16:12:27 UTC
This bugzilla is included in oVirt 4.2.7 Async 1 release, published on November 13th 2018.

Since the problem described in this bug report should be resolved in oVirt 4.2.7 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.