Bug 1892519
Summary: | Clone of VM with Direct LUN creates new VM with ghost disk which fails to preview snapshot later. | ||
---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Germano Veit Michel <gveitmic> |
Component: | ovirt-engine | Assignee: | Shmuel Melamud <smelamud> |
Status: | CLOSED ERRATA | QA Contact: | Tamir <tamir> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 4.4.2 | CC: | ahadas, emarcus, lrotenbe, michal.skrivanek |
Target Milestone: | ovirt-4.4.4 | Keywords: | TestOnly |
Target Release: | --- | Flags: | tamir:
testing_plan_complete+
|
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | ovirt-engine-4.4.4.3 | Doc Type: | No Doc Update |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-02-02 13:58:29 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
Germano Veit Michel
2020-10-29 02:29:36 UTC
Two more notes: 1) I had to trigger the clone via Rest API, see BZ1892525. # cat /tmp/upload.xml <action><vm><name>cloned_vm2</name></vm></action> # curl -vvv -k -u "admin@internal:redhat" -H "Content-type: application/xml" -T /tmp/upload.xml -X POST https://engine.kvm/ovirt-engine/api/vms/8d508df2-8f7d-45b7-919a-765ed0b3f4c6/clone 2) If the Direct LUN is active, the issue still happens, the difference is the disk is "plugged" on the cloned VM and the VM is not image_locked after the snapshot preview, which is still stuck too. vm_id | device_id | device | type | alias | is_plugged | is_managed --------------------------------------+--------------------------------------+--------+------+-----------------------------------------+------------+------------ a5cd6f2d-f9bc-4418-a05e-d71f546c9919 | b55481c3-1f81-426f-be56-2f536b324713 | disk | disk | ua-276e4308-6439-4e62-b5e5-c27d98f40456 | t | t So deactivating the Direct LUN should not be necessary to reproduce. Assuming the direct LUN is shareable (read-only).. (In reply to Arik from comment #2) > Assuming the direct LUN is shareable (read-only).. It wasn't necessary to have it shared to reproduce the ghost disk in vm_device table. (In reply to Germano Veit Michel from comment #3) > (In reply to Arik from comment #2) > > Assuming the direct LUN is shareable (read-only).. > > It wasn't necessary to have it shared to reproduce the ghost disk in > vm_device table. Right, I wrote comment 2 during a meeting in which we discussed possible solutions as a reminder to follow up on that and didn't get to it, sorry. So how about: Fail the clone operation (if the user can drop the LUN disk from the clone-VM dialog/rest-api) or filter out the LUN disk automatically during clone-VM when the LUN is not shareable. Add a proper device for the LUN disk when it's shareable. Would that make sense? (I'm not that familiar with direct LUNs) Thanks Arik! (In reply to Arik from comment #4) > So how about: > Fail the clone operation (if the user can drop the LUN disk from the > clone-VM dialog/rest-api) Wouldn't this risk breaking cloning from snapshots too? And it it doesn't break it, the LUN from the vm_configuration would still need some logic like below to prevent the problem. Right? > or filter out the LUN disk automatically during > clone-VM when the LUN is not shareable. > Add a proper device for the LUN disk when it's shareable. > Would that make sense? (I'm not that familiar with direct LUNs) I think these make a lot more sense. However currently the LUN device is not cloned to the new VM so I'd say just filter out to avoid a behaviour change, as customers may have automation or procedures already set to attach the shared LUN, or a new LUN to the cloned VM. So IMHO I'd say just filter out on all scenarios. I don't think it could break clone-from-snapshot because LUN disks are never part of snapshots [1]. Which makes me think that there's a chance this is solved in 4.4.3 already - We've changed clone-vm to first make a snapshot and then clone the disks from the snapshot so LUNs may already be filtered out. But needs to check this. [1] https://github.com/oVirt/ovirt-engine/blob/ovirt-engine-4.4.2/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/LunDisk.java#L35-L38 (In reply to Arik from comment #6) > I don't think it could break clone-from-snapshot because LUN disks are never > part of snapshots [1]. > Which makes me think that there's a chance this is solved in 4.4.3 already - > We've changed clone-vm to first make a snapshot and then clone the disks > from the snapshot so LUNs may already be filtered out. > But needs to check this. > > [1] > https://github.com/oVirt/ovirt-engine/blob/ovirt-engine-4.4.2/backend/ > manager/modules/common/src/main/java/org/ovirt/engine/core/common/ > businessentities/storage/LunDisk.java#L35-L38 Thanks. I thought they were part of vm_configuration of the snapshot, which would be read to produce the new VM vm_devices. But if its not there then great :) Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (RHV Engine and Host Common Packages 4.4.z [ovirt-4.4.4]), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:0312 |