Bug 994860

Summary: VM image stays locked when creating template and closing engine
Product: Red Hat Enterprise Virtualization Manager Reporter: Lior Vernia <lvernia>
Component: ovirt-engineAssignee: Omer Frenkel <ofrenkel>
Status: CLOSED CURRENTRELEASE QA Contact: meital avital <mavital>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.3.0CC: acathrow, amureini, bazulay, gwatson, iheim, laravot, lpeer, michal.skrivanek, ofrenkel, pstehlik, Rhev-m-bugs, scohen, yeylon
Target Milestone: ---   
Target Release: 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: is11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-21 22:17:11 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:
Attachments:
Description Flags
oVirt engine log none

Description Lior Vernia 2013-08-08 06:58:18 UTC
Created attachment 784241 [details]
oVirt engine log

Description of problem:

I tried to make a template out of a VM, then closed the engine for the night. Turned it back on this morning, and found that VM status is still "Image Locked". The template appears in the templates tab, but can't be used to create a new VM from.


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

oVirt 3.3 master branch.


How reproducible:

Haven't tried more than once, steps below.


Steps to Reproduce:
1. Create VM.
2. Create template from VM.
3. Shut down engine for 12 hours.

Actual results:

Image stays locked, VM can't be run and new VMs can't be created from the template.


Expected results:

Image surely shouldn't be locked anymore after 12 hours, VM and template should be usable.


Additional info:

Attached engine log, please disregard the cluttering errors about the decryption of the engine admin password.

Comment 1 Michal Skrivanek 2013-08-08 13:56:51 UTC
the locking of template creation was removed, so the template is indeed created right away and then the image creation lock&release is a separate operation. Moving to storage

Comment 2 Allon Mureinik 2013-08-14 06:34:18 UTC
This is probably due to the recent changes in async task manager.
Liron, please take a look?

Comment 3 Liron Aravot 2013-08-14 10:09:02 UTC
Michal, the issue is related to the parameters serialization and also relates to change  http://gerrit.ovirt.org/#/c/14584/

the master vm isn't being serialized, thus NPE is caused when attempting to use parameterMasterVm.getDefaultDisplayType() @ line 110.

moving back to virt, we need to see if the bug is general (master vm isn't being serialized) or we are fine with it not being serialized but shouldn't access it's properties when it's null.

Comment 4 Omer Frenkel 2013-08-14 12:27:50 UTC
(In reply to Liron Aravot from comment #3)
> Michal, the issue is related to the parameters serialization and also
> relates to change  http://gerrit.ovirt.org/#/c/14584/
> 
> the master vm isn't being serialized, thus NPE is caused when attempting to
> use parameterMasterVm.getDefaultDisplayType() @ line 110.
> 

right, master vm is not serialized and used in ctor without a null check.

Comment 5 Aharon Canan 2013-09-10 12:11:37 UTC
Omer, 

in order to verify I need verification steps, 
Reproduction steps will take too long and I am almost sure we shouldn't wait 12 hours.

can you please share better steps?

Comment 6 Omer Frenkel 2013-09-10 12:35:06 UTC
(In reply to Aharon Canan from comment #5)
> Omer, 
> 
> in order to verify I need verification steps, 
> Reproduction steps will take too long and I am almost sure we shouldn't wait
> 12 hours.
> 
> can you please share better steps?

yes, just restart engine while creating a template (vm and templated in locked status),
if you have large disk (>3gb preallocated) it should be enough.
no need to wait

Comment 7 Aharon Canan 2013-09-10 14:22:46 UTC
Following comment #6, verified using is12

1. Create VM 
2. Create template
3. while image lock restart engine
4. after engine back start the VM and create new VM from template you created and run it as well.

Comment 9 Itamar Heim 2014-01-21 22:17:11 UTC
Closing - RHEV 3.3 Released

Comment 10 Itamar Heim 2014-01-21 22:23:48 UTC
Closing - RHEV 3.3 Released