Bug 862802

Summary: Locked templates are not selectable when creating a new VM
Product: [Retired] oVirt Reporter: Adam Litke <alitke>
Component: ovirt-engine-webadminAssignee: Einav Cohen <ecohen>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: abaron, acathrow, amureini, ecohen, iheim, mgoldboi, michal.skrivanek, vvyazmin, ykaul
Target Milestone: ---   
Target Release: 3.3.4   
Hardware: All   
OS: All   
Whiteboard: virt
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-31 14:23:05 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:

Description Adam Litke 2012-10-03 15:12:10 UTC
Description of problem:
Templates that are locked (because another VM of the same type is being created), do not appear in the list of available templates when creating additional VMs.


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


How reproducible: Always


Steps to Reproduce:
1. Create a VM from a template
2. Immediately attempt to create another VM from same template
  
Actual results:
Template is not available in the 'Based on template' list box.

Expected results:
Template should be selectable (even if that means the vm create process would be delayed.


Additional info:

Comment 1 Ayal Baron 2012-10-03 21:06:02 UTC
I believe this is intentional (and not the delayed behaviour) due to engine's current lack of ability to differentiate between the reasons the template is locked.
This means that it could be locked because it is being deleted so the suggestion above (waiting) would not work with current design.
The alternatives are:
1. have a list there and grey out with a tool tip
2. differentiate between reasons for lock, allow multiple concurrent creations, filter out when irrelevant (deleting) and we would still need to determine proper behaviour for other types of operations which are incompatible with creation (but if we wait then possibly we could succeed).

Comment 2 Adam Litke 2012-10-03 21:18:57 UTC
Thanks for your reply Ayal...

Hmm.  I guess I am a bit confused why a template must even be locked for creations to happen.  I think of this as roughly equivalent to 'qemu-img create -b <template> <new-im>'.  In that case, the base image doesn't even need to be touched.  Obviously there is a lot more going on underneath the covers.

Don't Volumes that are being deleted get a assigned a Volume Legality of ILLEGAL?  Could that be used to filter locked templates?  Does the HSM storage locking protect against multiple simultaneous creations?  Would the 'clone' operation just block until the previous one is finished?

Comment 3 Ayal Baron 2012-11-08 09:39:52 UTC
*** Bug 874451 has been marked as a duplicate of this bug. ***

Comment 4 Michal Skrivanek 2013-07-31 14:23:05 UTC
Arik fixed the locking in 3.3 so you should not see that anymore.