Red Hat Bugzilla – Bug 862802
Locked templates are not selectable when creating a new VM
Last modified: 2016-01-28 16:55:39 EST
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):
How reproducible: Always
Steps to Reproduce:
1. Create a VM from a template
2. Immediately attempt to create another VM from same template
Template is not available in the 'Based on template' list box.
Template should be selectable (even if that means the vm create process would be delayed.
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).
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?
*** Bug 874451 has been marked as a duplicate of this bug. ***
Arik fixed the locking in 3.3 so you should not see that anymore.