Created attachment 822102 [details]
Description of problem:
Live storage migration fails because another operation was managed to take a lock on the disk.
Happened to me when during LSM, I tried to attach the disk snapshot to another VM with REST (as part of the new backup-API feature)
Version-Release number of selected component (if applicable):
Steps to Reproduce:
On a block/file pool with 2 SDs:
1. create 2 VMs with disk and run them
2. live migrate one of the VMs disk to the second SD
3. during the LSM operation (right after it began), attach the disk snapshot (the one that is simultaneously migrating) to the other running vm using REST
The disk attachment operation succeeds and LSM fails.
LSM is failing with a CanDoAction:
2013-11-10 15:56:12,613 WARN [org.ovirt.engine.core.bll.lsm.LiveMigrateVmDisksCommand] (ajp-/127.0.0.1:8702-4) [47722e08] CanDoAction of action LiveMigrateVmDisks failed. Reasons:VAR__ACTION__MOVE,VAR__TYPE__VM_D
The migrated disk should be locked until the live storage migration operation ends. Other operations on the same disk should be blocked.
When trying to attach a disk snapshot to VM, while the the itself is being live migrated, the operation get blocked by engine, this is the message we get on REST:
[Cannot attach Virtual Machine Disk. Disk iscsi5-3_Disk1 is being moved or copied.]
Verified using is26
Closing - RHEV 3.3 Released