Bug 1161237 - [engine-backend] Disk remains attached to a VM while the VM is down and the disk is being removed
Summary: [engine-backend] Disk remains attached to a VM while the VM is down and the d...
Keywords:
Status: CLOSED DUPLICATE of bug 1161204
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.5.0
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.5.1
Assignee: Arik
QA Contact:
URL:
Whiteboard: virt
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-06 17:46 UTC by Elad
Modified: 2014-12-09 07:16 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-12-09 07:16:02 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
logs from host and engine.log (3.34 MB, application/x-gzip)
2014-11-06 17:46 UTC, Elad
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1161204 0 medium CLOSED [engine-backend] SQLException while starting a VM which was stateless before and had a disk attached to it while it was ... 2021-02-22 00:41:40 UTC

Internal Links: 1161204

Description Elad 2014-11-06 17:46:50 UTC
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

Comment 1 Allon Mureinik 2014-11-20 13:14:35 UTC
This is part of the stateless flow - moving to virt to triage.

Comment 2 Michal Skrivanek 2014-12-02 14:45:21 UTC
*** Bug 1161204 has been marked as a duplicate of this bug. ***

Comment 3 Michal Skrivanek 2014-12-02 15:21:01 UTC
this actually sounds like a proper behavior...

Comment 4 Elad 2014-12-02 15:35:30 UTC
(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.

Comment 5 Arik 2014-12-08 13:34:23 UTC
(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.

Comment 6 Elad 2014-12-09 07:16:02 UTC
(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 ***


Note You need to log in before you can comment on or make changes to this bug.