Bug 868648

Summary: engine: I can undo snapshot and export the vm at the same time -> both actions succeed and vm is not in image lock during export (so you can perform other actions on image)
Product: Red Hat Enterprise Virtualization Manager Reporter: Dafna Ron <dron>
Component: ovirt-engineAssignee: Arik <ahadas>
Status: CLOSED CURRENTRELEASE QA Contact: Dafna Ron <dron>
Severity: high Docs Contact:
Priority: high    
Version: 3.0.7CC: dyasny, hateya, iheim, lpeer, Rhev-m-bugs, sgrinber, yeylon, ykaul
Target Milestone: ---   
Target Release: 3.2.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: virt
Fixed In Version: sf4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-11 08:16:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 915537    
Attachments:
Description Flags
logs none

Description Dafna Ron 2012-10-21 12:55:02 UTC
Created attachment 630853 [details]
logs

Description of problem:

I was able to undo an image and export the vm at the same time. 
both actions succeeds and the vm's images are not locked during the export which allows me to create a second image/create a template/ remove snapshot/run the vm during the export vm action. 

Version-Release number of selected component (if applicable):

si21.1

How reproducible:

100%

Steps to Reproduce:
1. create a vm with snapshot and put vm in preview
2. undo preview + export the vm
3.
  
Actual results:

both actions succeed
the vm is not locked during export and I can run the vm or perform other actions on its image during export. 

Expected results:

we should  not be able to run both actions at the same time
if so, vm should still be locked so we cannot run other actions on vm. 

Additional info:vdsm and engine logs


in attached log I managed to export the vm and create a template from it after running undo snapshot+export vm

[root@blond-vdsg ~]# vdsClient -s 0 getAllTasksInfo
3d36637f-ebf2-455b-b907-f2cfef4618e1 :
	verb = moveImage
	id = 3d36637f-ebf2-455b-b907-f2cfef4618e1
e5fa1277-31e5-49ba-96e6-ef2f4e7ebf92 :
	verb = copyImage
	id = e5fa1277-31e5-49ba-96e6-ef2f4e7ebf92


as we can see the tasks are on the same img: 


Thread-8636::INFO::2012-10-21 14:39:11,819::logUtils::37::dispatcher::(wrapper) Run and protect: copyImage(sdUUID='7c1d9020-7cf4-446b-ab12-6fc4316f86e6', spUUID='907cb9eb-d662-4a17-a18e-25f36e41807c', vmUUID='', srcImgUUID='fe6100b2-e7b7-46bb-a407-ede6ea7f7c18', srcVolUUID='2a04dacc-befd-4b2b-8487-cd560e3d6cea', dstImgUUID='0b2198f5-8e44-41da-abdf-71a214e3e65f', dstVolUUID='0d1a09f8-5e41-48f5-b21a-91dcfdc73228', description='1', dstSdUUID='7c1d9020-7cf4-446b-ab12-6fc4316f86e6', volType=6, volFormat=5, preallocate=1, postZero='false', force='false')


Thread-8617::INFO::2012-10-21 14:38:52,419::logUtils::37::dispatcher::(wrapper) Run and protect: moveImage(spUUID='907cb9eb-d662-4a17-a18e-25f36e41807c', srcDomUUID='7c1d9020-7cf4-446b-ab12-6fc4316f86e6', dstDomUUID='3beaf27a-9d64-49f5-9e4a-f4147cbbf6d9', imgUUID='fe6100b2-e7b7-46bb-a407-ede6ea7f7c18', vmUUID='', op=1, postZero='false', force='false')

Comment 1 Arik 2013-01-10 10:06:48 UTC
http://gerrit.ovirt.org/#/c/10845/

Comment 3 Dafna Ron 2013-01-30 10:22:41 UTC
verified on sf4

I was unable to export the vm while taking a snapshot, deleting a snapshot or undo preview.

Comment 4 Itamar Heim 2013-06-11 08:16:50 UTC
3.2 has been released