Created attachment 965598 [details] engine.log Description of problem: I've encountered a scenario in which a disk, which was hotplugged to a stateless VM, got deleted from the setup when the VM was powered-off. Version-Release number of selected component (if applicable): rhev 3.5 vt13.1 rhevm-3.5.0-0.23.beta.el6ev.noarch How reproducible: Always Steps to Reproduce: 1) Created a VM with 1 disk attached and started it as stateless 2) Attached a second disk to the VM as active while the VM was running 3) Powered off the VM Actual results: Once the VM stopped, the new disk got removed from the system Destroy for the stateless VM and right after, RemoveImageCommand for the hotplugged disk: 2014-12-07 18:35:57,652 INFO [org.ovirt.engine.core.vdsbroker.irsbroker.DestroyImageVDSCommand] (org.ovirt.thread.pool-7-thread-28) [290f86bd] START, DestroyImageVDSCommand( storagePoolId = 00000002-0002-0002-0002-0000000000cd, ignoreFailoverLimit = false, storageDomainId = eb789b25-d780-44a5-9ba4-237e104b9f0f, imageGroupId = 9df3f8b3-ac94-4f98-acfc-65e96cdec95e, imageId = 00000000-0000-0000-0000-000000000000, imageList = [cfb108e4-8222-4558-89f2-4638b131ea6c], postZero = false, force = true), log id: 2a226d1 2014-12-07 18:35:57,745 INFO [org.ovirt.engine.core.vdsbroker.irsbroker.DestroyImageVDSCommand] (org.ovirt.thread.pool-7-thread-28) [290f86bd] FINISH, DestroyImageVDSCommand, log id: 2a226d1 2014-12-07 18:35:57,746 INFO [org.ovirt.engine.core.bll.tasks.CommandAsyncTask] (org.ovirt.thread.pool-7-thread-28) [290f86bd] CommandAsyncTask::Adding CommandMultiAsyncTasks object for command 8833dbb4-f682-407b-952c-426a226ce69d 2014-12-07 18:35:57,746 INFO [org.ovirt.engine.core.bll.CommandMultiAsyncTasks] (org.ovirt.thread.pool-7-thread-28) [290f86bd] CommandMultiAsyncTasks::AttachTask: Attaching task ac63487e-71b3-4ed6-85a3-a74676fac744 to command 8833dbb4-f682-407b-952c-426a226ce69d. 2014-12-07 18:35:57,765 INFO [org.ovirt.engine.core.bll.tasks.AsyncTaskManager] (org.ovirt.thread.pool-7-thread-28) [290f86bd] Adding task ac63487e-71b3-4ed6-85a3-a74676fac744 (Parent Command RestoreAllSnapshots, Parameters Type org.ovirt.engine.core.common.asynctasks.AsyncTaskParameters), polling hasn't started yet.. 2014-12-07 18:35:57,841 INFO [org.ovirt.engine.core.bll.RemoveImageCommand] (org.ovirt.thread.pool-7-thread-28) [41e0d91a] Running command: RemoveImageCommand internal: true. Entities affected : ID: 00000000-0000-0000-0000-000000000000 Type: Storage 2014-12-07 18:35:57,912 INFO [org.ovirt.engine.core.vdsbroker.irsbroker.DeleteImageGroupVDSCommand] (org.ovirt.thread.pool-7-thread-28) [41e0d91a] START, DeleteImageGroupVDSCommand( storagePoolId = 00000002-0002-0002-0002-0000000000cd, ignoreFailoverLimit = false, storageDomainId = eb789b25-d780-44a5-9ba4-237e104b9f0f, imageGroupId = 71d10b74-1276-4c47-861e-972de6289f9e, postZeros = false, forceDelete = false), log id: 69ca5876 2014-12-07 18:35:58,394 INFO [org.ovirt.engine.core.vdsbroker.irsbroker.DeleteImageGroupVDSCommand] (org.ovirt.thread.pool-7-thread-28) [41e0d91a] FINISH, DeleteImageGroupVDSCommand, log id: 69ca5876 2014-12-07 18:35:58,396 INFO [org.ovirt.engine.core.bll.CommandMultiAsyncTasks] (org.ovirt.thread.pool-7-thread-28) [41e0d91a] CommandMultiAsyncTasks::AttachTask: Attaching task c2881f7a-50d2-4887-9c51-5323695d88f6 to command 8833dbb4-f682-407b-952c-426a226ce69d. Expected results: It's a tricky scenario. When a stateless VM is stopped, restore VM from snapshot is executed and all the data written while the VM was up is dicarted. But, regarding the attached disk, it should not be removed from the system, it should be detached from the VM. Engine should inform that the disk will be detached once the VM will be powered off. Additional info: engine.log
not a regression, moving to 3.5.1
*** This bug has been marked as a duplicate of bug 1161204 ***