Created attachment 955577 [details] logs Description of problem: Trying to resize an image disk while it is attached to a paused VM causes the image to get stuck as LOCKED. 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 How reproducible: Always Steps to Reproduce: 1. Create a VM with a disk attached, start it in paused state 2. Perform a live resize to the disk while it is attached to the paused VM 3. The image gets LOCKED. tried to resume the VM, it was blocked on CanDoAction: 2014-11-09 23:05:35,046 WARN [org.ovirt.engine.core.bll.RunVmCommand] (ajp-/127.0.0.1:8702-5) [7c4a42d4] CanDoAction of action RunVm failed. Reasons:VAR__ACTION__RUN,VAR__TYPE__VM,ACTION_TYPE_FAILED_VM_IS_LOCKED Then I stopped the VM. The image remained LOCEKD. Actual results: The request to extend the disk as shown in engine.log: 2014-11-09 23:02:29,693 INFO [org.ovirt.engine.core.bll.UpdateVmDiskCommand] (ajp-/127.0.0.1:8702-14) [247d4b89] Running command: UpdateVmDiskCommand internal: false. Entities affected : ID: 3e5be0c4-ffb4-48e0-95ff-5d4d391c3b48 Type: DiskAction group EDIT_DISK_PROPERTIES with role type USER 2014-11-09 23:02:29,709 INFO [org.ovirt.engine.core.bll.ExtendImageSizeCommand] (ajp-/127.0.0.1:8702-14) [7f70c980] Running command: ExtendImageSizeCommand internal: true. Enti ties affected : ID: 3e5be0c4-ffb4-48e0-95ff-5d4d391c3b48 Type: DiskAction group EDIT_DISK_PROPERTIES with role type USER The task is executed by vdsm but it seems that engine do not poll it so it remains in state 'finished' in vdsm tasks queue: [root@green-vdsb ~]# vdsClient -s 0 getAllTasks efc97870-d3e7-4d7e-b80a-ac5bcb082aad : verb = extendVolumeSize code = 0 state = finished tag = spm result = message = 1 jobs completed successfully id = efc97870-d3e7-4d7e-b80a-ac5bcb082aad efc97870-d3e7-4d7e-b80a-ac5bcb082aad::DEBUG::2014-11-09 23:02:30,869::task::595::Storage.TaskManager.Task::(_updateState) Task=`efc97870-d3e7-4d7e-b80a-ac5bcb082aad`::moving from state running -> state finished After ~35 min: Thread-24082::DEBUG::2014-11-09 23:36:19,858::task::1191::Storage.TaskManager.Task::(prepare) Task=`3bff3ac3-9ed1-4969-8ced-94954c4000ad`::finished: {'tasks': {'efc97870-d3e7-4d 7e-b80a-ac5bcb082aad': {'code': 0, 'tag': u'spm', 'state': 'finished', 'verb': 'extendVolumeSize', 'result': '', 'message': '1 jobs completed successfully', 'id': 'efc97870-d3e7 -4d7e-b80a-ac5bcb082aad'}}} The image remains LOCKED. image_guid | disk_alias | imagestatus --------------------------------------+-------------+------------- 3f8c8b58-b3d5-48c1-8f5d-17bd1bdbe297 | vm-3_Disk1 | 2 Expected results: 1) In my opinion, resize to a disk while it is attached to a VM in pasued should be blocked on CanDoAction 2) If it should not be blocked, engine should poll the task and clean it so the image won't get stuck in LOCKED Additional info: engine.log vdsm.log messages qemu log
Amit, all that is needed is to prevent the VM disk from being resized while the VM is in paused state
A disk, attached to a paused VM cannot be resized. " Cannot edit Virtual Machine Disk because the VM is in Paused status. " Verified using ovirt-engine-3.6.0_qa1 ovirt-engine-3.6.0-0.0.master.20150412172306.git55ba764.el6.noarch
RHEV 3.6.0 has been released, setting status to CLOSED CURRENTRELEASE