Bug 1167284 - [Pools] > New pool > double clicking on 'ok' will create the same pool twice with wrong calculation of vm's in pool
Summary: [Pools] > New pool > double clicking on 'ok' will create the same pool twice ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.5.0
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ovirt-3.6.0-rc
: 3.6.0
Assignee: Shmuel Melamud
QA Contact: Michael Burman
URL:
Whiteboard:
Depends On: 1167327 1249631
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-24 11:27 UTC by Michael Burman
Modified: 2016-04-20 01:11 UTC (History)
10 users (show)

Fixed In Version: 3.6.0-4 alpha3
Doc Type: Bug Fix
Doc Text:
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.
Clone Of:
Environment:
Last Closed: 2016-04-20 01:11:49 UTC
oVirt Team: Virt
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
engine log (4.94 MB, text/plain)
2014-11-24 11:27 UTC, Michael Burman
no flags Details
new engine log (1.42 MB, application/x-gzip)
2015-06-02 14:39 UTC, Michael Burman
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 43399 0 master MERGED core: VM_POOL_NAME lock on VM pool creation Never

Description Michael Burman 2014-11-24 11:27:04 UTC
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.

Comment 1 Michal Skrivanek 2014-11-25 09:19:52 UTC
Occe the UI is solved it's going to solve this bug too.

Comment 2 Michal Skrivanek 2014-11-25 09:21:30 UTC
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...

Comment 3 Michal Skrivanek 2015-06-02 10:51:37 UTC
seems the UI issue is fixed? can you confirm if there is no other issue?

Comment 4 Michael Burman 2015-06-02 14:27:16 UTC
Hi Michael,

No, i can't confirm. 

Double click on 'ok' created 4 pool entities named 'mb' with a different number of assigned VMs. attaching engine.log

Comment 5 Michael Burman 2015-06-02 14:39:01 UTC
Created attachment 1033838 [details]
new engine log

Comment 6 Michael Burman 2015-06-02 14:41:19 UTC
tested on - 3.6.0-0.0.master.20150519172219.git9a2e2b3.el6

Comment 7 Omer Frenkel 2015-07-07 15:12:20 UTC
Shmuel, is this fixed by https://gerrit.ovirt.org/#/c/40557 ?
we might be able to fix this now that we have locking group for vm pools

Comment 8 Shmuel Melamud 2015-07-07 16:14:53 UTC
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.

Comment 9 Michael Burman 2015-08-23 10:42:27 UTC
Verified on - 3.6.0-0.12.master.el6


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