Previously, when user quickly pressed "OK" button twice in the VM pool creation dialog, two identical pools were created. This issue was resolved and now only one VM pool is created even if "OK" button was clicked several times.
Created attachment 960674[details]
engine log
Description of problem:
[GUI]>[Pools] > New pool > double clicking on 'ok' will create the same pool twice with wrong calculation of vm's in pool. In the event log will be error about creating the pool, but the pool will be created twice, with the same name and wrong number of vm's in the pool.
Version-Release number of selected component (if applicable):
3.5.0-0.21.el6ev
How reproducible:
always
Steps to Reproduce:
1. [Pools] > new pool> create new pool(can be from template) with 50 vm's in pool
2. click double click on 'ok' to approve operation
3.
Actual results:
The same pool will be created twice with the same name, and wrong number of vm's.
each pool will get something like 27-28 vm's per pool.
Expected results:
Pool should be created once with the right amount of vm's.
regarding REST API calls..well, for 2 same requests you would get twice as many VMs...but that's basically what you would have asked for - so it works. Not worth adding any code around it...
No. VM_POOL lock can be taken when the pool is already created and we know its guid. This is ok for pool updates. To avoid creation of two pools with the same name in the same time we need to lock pool name. So we need VM_POOL_NAME lock in addition to VM_POOL lock like we have VM_NAME lock in addition to VM lock.
Created attachment 960674 [details] engine log Description of problem: [GUI]>[Pools] > New pool > double clicking on 'ok' will create the same pool twice with wrong calculation of vm's in pool. In the event log will be error about creating the pool, but the pool will be created twice, with the same name and wrong number of vm's in the pool. Version-Release number of selected component (if applicable): 3.5.0-0.21.el6ev How reproducible: always Steps to Reproduce: 1. [Pools] > new pool> create new pool(can be from template) with 50 vm's in pool 2. click double click on 'ok' to approve operation 3. Actual results: The same pool will be created twice with the same name, and wrong number of vm's. each pool will get something like 27-28 vm's per pool. Expected results: Pool should be created once with the right amount of vm's.