Bug 958370 - engine: unlock_entity is not locating locked snapshots
Summary: engine: unlock_entity is not locating locked snapshots
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.2.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: 3.2.0
Assignee: Eli Mesika
QA Contact: Dafna Ron
URL:
Whiteboard: infra
Depends On:
Blocks: 948448 967855
TreeView+ depends on / blocked
 
Reported: 2013-05-01 08:15 UTC by Dafna Ron
Modified: 2016-02-10 19:03 UTC (History)
13 users (show)

Fixed In Version: sf16
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 967855 (view as bug list)
Environment:
Last Closed:
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
db dump (5.13 MB, application/octet-stream)
2013-05-01 08:15 UTC, Dafna Ron
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 14494 0 None None None Never
oVirt gerrit 14530 0 None None None Never

Description Dafna Ron 2013-05-01 08:15:27 UTC
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)

Comment 3 Barak 2013-05-05 08:43:43 UTC
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 ?

Comment 4 Eli Mesika 2013-05-05 14:11:30 UTC
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

Comment 5 Allon Mureinik 2013-05-05 15:03:59 UTC
(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

Comment 6 Eli Mesika 2013-05-07 07:24:40 UTC
fix caused a regression when handling disk , sql statement is prepared but not executed

Comment 7 Dafna Ron 2013-05-12 13:03:24 UTC
verified on sf16

Comment 9 Itamar Heim 2013-06-11 09:09:07 UTC
3.2 has been released

Comment 10 Itamar Heim 2013-06-11 09:09:07 UTC
3.2 has been released

Comment 11 Itamar Heim 2013-06-11 09:09:18 UTC
3.2 has been released

Comment 12 Itamar Heim 2013-06-11 09:37:25 UTC
3.2 has been released


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