Bug 862802 - Locked templates are not selectable when creating a new VM
Summary: Locked templates are not selectable when creating a new VM
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-webadmin
Version: unspecified
Hardware: All
OS: All
unspecified
unspecified
Target Milestone: ---
: 3.3.4
Assignee: Einav Cohen
QA Contact:
URL:
Whiteboard: virt
: 874451 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-03 15:12 UTC by Adam Litke
Modified: 2016-01-28 21:55 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-31 14:23:05 UTC
oVirt Team: ---
Embargoed:


Attachments (Terms of Use)

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.


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