Created attachment 742121 [details] db dump Description of problem: I have a locked snapshot part of a failure in LiveStorageMigration which kept the snapshot locked while the vm and disk are unlocked. unlock_entity is not locating the locked snapshot Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: engine=# select status,snapshot_id from snapshots where status ilike '%LOCKED%' ; status | snapshot_id --------+-------------------------------------- LOCKED | b9ad9a8b-267b-4938-9edf-fbe414199dee the help shows that no snapshot object is availble: -t TYPE - The object type {vm | template | disk} and none of the other objects are shown as locked: /usr/share/ovirt-engine/dbscripts /usr/share/ovirt-engine/dbscripts entity_id | disk_id -----------+--------- (0 rows) /usr/share/ovirt-engine/dbscripts [root@Dafna-32 dbscripts]# ./unlock_entity.sh -t template -q -s localhost -p 5432 -d engine -u postgres /usr/share/ovirt-engine/dbscripts /usr/share/ovirt-engine/dbscripts template_name --------------- (0 rows) template_name | disk_id ---------------+--------- (0 rows) /usr/share/ovirt-engine/dbscripts [root@Dafna-32 dbscripts]# ./unlock_entity.sh -t vm -q -s localhost -p 5432 -d engine -u postgres /usr/share/ovirt-engine/dbscripts /usr/share/ovirt-engine/dbscripts vm_name --------- (0 rows) vm_name | disk_id ---------+--------- (0 rows)
Allon, As far as I understand in one of the flows of snapshot locking the VM is locked as well. What are the cases we need to take under consideration ?
AS far as I see we should support 1) -t snapshot flag to display locked snapshots where -q is used 2) -t snapshot to remove a specific snapshot 3) -r if run with -t vm then all vm snapshots are removed as well
(In reply to comment #3) > Allon, > > As far as I understand in one of the flows of snapshot locking the VM is > locked as well. > > What are the cases we need to take under consideration ? The only usecase I'm aware of that locks both the VM and the snapshot is AddVmFromSnapshot
fix caused a regression when handling disk , sql statement is prepared but not executed
verified on sf16
3.2 has been released