Bug 1168249

Summary: VM detach from Vmpool should be blocked in case VM has not yet finished to be created.
Product: Red Hat Enterprise Virtualization Manager Reporter: Ilanit Stein <istein>
Component: ovirt-engineAssignee: Shmuel Melamud <smelamud>
Status: CLOSED CURRENTRELEASE QA Contact: sefi litmanovich <slitmano>
Severity: medium Docs Contact:
Priority: low    
Version: 3.5.0CC: gklein, lpeer, lsurette, mavital, michal.skrivanek, rbalakri, Rhev-m-bugs, smelamud, srevivo, ykaul
Target Milestone: ovirt-3.6.0-rc   
Target Release: 3.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 3.6.0-4 alpha3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-20 01:35:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ilanit Stein 2014-11-26 13:45:21 UTC
Description of problem:
In case of adding a VM to a Vmpool, while VM was not finished to be created (still locked), detach the VM from Vmpool is possible, and then, when the VM creation is finished, the VM is added back to the pool. 

This problem fail the VMs automatic test, with flow:
1. Add vm to a VMpool
2. Detach all vms (while VM is still in locked status)
3. Try to remove vmpool => fail since there is a VM attached to the Vmpool.

Version-Release number of selected component (if applicable):
vt10.1

Expected results:
Block detach of VM from Vmpool, if it still under creation process.

Comment 1 Michal Skrivanek 2015-06-02 10:52:39 UTC
shmuel, can you please re-check if this is relevant after the new implementation of pool removal?

Comment 2 Shmuel Melamud 2015-06-09 18:03:52 UTC
Done. See the change on Gerrit.

Comment 3 sefi litmanovich 2015-10-19 11:29:44 UTC
Verified rhevm-3.6.0.1-0.1.el6.noarch.

tested according to description.
Detaching vm from pool while vm image is still locked is blocked.
Remove pool is also blocked until vms are created.

There is a problem with formatting the error message that's invoked when you try to delete the pool when vm's are still created. I get:

Cannot ${action} ${type}. This VM Pool is currently in use to create VM ${VmName}.

Let me know if there's an open bz on this one and if not I shall open one.

Comment 4 Shmuel Melamud 2015-11-09 12:24:31 UTC
(In reply to sefi litmanovich from comment #3)
> There is a problem with formatting the error message that's invoked when you
> try to delete the pool when vm's are still created. I get:
> 
> Cannot ${action} ${type}. This VM Pool is currently in use to create VM
> ${VmName}.
> 
> Let me know if there's an open bz on this one and if not I shall open one.

Bug 1255590 describes the same problem.