Bug 994860 - VM image stays locked when creating template and closing engine
VM image stays locked when creating template and closing engine
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.3.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 3.3.0
Assigned To: Omer Frenkel
meital avital
virt
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-08 02:58 EDT by Lior Vernia
Modified: 2015-09-22 09 EDT (History)
13 users (show)

See Also:
Fixed In Version: is11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-21 17:17:11 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
oVirt engine log (1.59 MB, text/x-log)
2013-08-08 02:58 EDT, Lior Vernia
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 18144 None None None Never

  None (edit)
Description Lior Vernia 2013-08-08 02:58:18 EDT
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 09:56:51 EDT
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 02:34:18 EDT
This is probably due to the recent changes in async task manager.
Liron, please take a look?
Comment 3 Liron Aravot 2013-08-14 06:09:02 EDT
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 08:27:50 EDT
(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 08:11:37 EDT
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 08:35:06 EDT
(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 10:22:46 EDT
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 17:17:11 EST
Closing - RHEV 3.3 Released
Comment 10 Itamar Heim 2014-01-21 17:23:48 EST
Closing - RHEV 3.3 Released

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