Created attachment 954564 [details] logs from host and engine.log Description of problem: A disk, which had beed attached to a running stateless VM, remains attahed to it while it's being removed from the system. The image gets LOCKED until the deleteImage operation is completed. This causes the VM to be locked also and it cannot be started. Version-Release number of selected component (if applicable): rhev 3.5 vt9 rhevm-3.5.0-0.19.beta.el6ev.noarch Host OS: Red Hat Enterprise Linux Server release 7.0 (Maipo) vdsm-4.16.7.3-1.el7ev.x86_64 libvirt-daemon-1.1.1-29.el7_0.3.x86_64 qemu-kvm-rhev-1.5.3-60.el7_0.10.x86_64 selinux-policy-3.13.1-6.el7.noarch sanlock-3.1.0-2.el7.x86_6 How reproducible: Always Steps to Reproduce: 1. Create a VM with disk attached. Start the VM in stateless 2. Attach a new disk to the VM while it is running, hotplug the disk 3. Power-off the VM. Actual results: The disk is not detached from the VM. It is being removed while it is still attached to the VM. The VM cannot be started. 2014-11-06 17:35:34,921 INFO [org.ovirt.engine.core.vdsbroker.irsbroker.DeleteImageGroupVDSCommand] (org.ovirt.thread.pool-7-thread-13) [e5ccf2d] START, DeleteImageGroupVDSComm and( storagePoolId = 00000002-0002-0002-0002-0000000000df, ignoreFailoverLimit = false, storageDomainId = aa81f202-2540-4190-9184-b6fd116a2d2a, imageGroupId = 87962a25-7ae9-4553 -b21f-ca58f602b442, postZeros = false, forceDelete = false), log id: 530994fd Expected results: If the disk should be removed once the stateless VM is stopped (not sure if it's the desired behaviour), the disk should not remain attached to the VM becuase it causes the VM to be locked as well. The behaviour in such scenario should be simillar to a regular disk removal. Additional info: logs from host and engine.log
This is part of the stateless flow - moving to virt to triage.
*** Bug 1161204 has been marked as a duplicate of this bug. ***
this actually sounds like a proper behavior...
(In reply to Michal Skrivanek from comment #3) > this actually sounds like a proper behavior... The behaviour should be the same as removing a disk from a non-stateless VM (regular VM). The disk should be first detached and then removed from the system, so it will not cause the VM to get LOCKED until the remove disk operation will be finished.
(In reply to Elad from comment #4) why should the disk be removed? IIUC, it is related to your first question in bz 1161204 and the disk should not be removed. Do you agree? if you are, please close this one as duplicate of bz 1161204 and we'll discuss how to solve it there.
(In reply to Arik from comment #5) > (In reply to Elad from comment #4) > why should the disk be removed? > IIUC, it is related to your first question in bz 1161204 and the disk should > not be removed. > Do you agree? if you are, please close this one as duplicate of bz 1161204 > and we'll discuss how to solve it there. Agree, closing this one as add disk operation to a stateless VM should be blocked. If it will be decided that it should not be blocked, I'll re-open. *** This bug has been marked as a duplicate of bug 1161204 ***