Description of problem:
When detaching all the vms from a vm pool via UI the pool itself is automatically deleted as well.
This behaviour doesn't occur when detaching the last vm in the pool via REST API, in this case the pool will remain empty in the system.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create a vm pool with any amount of vms.
2. Detach all the vms (or only the last remaining one) from the pool via REST API:
Vms are detached from the pool, but the pool itself keep remaining in the system.
Vms are detached from the pool and the pool itself is removed from the system.
It does not sound like it but there is a pretty hard requirement of having only pools which have at least one VM. If this requirement is not fulfilled, the frontends start to fall apart throwing various exceptions such as
https://bugzilla.redhat.com/1378331 and https://bugzilla.redhat.com/show_bug.cgi?id=1378331
and Im pretty sure one could find more.
Fixing this issue should be as easy as changing:
new RemoveVmFromPoolParameters(guid, false, true),
new RemoveVmFromPoolParameters(guid, true, true),
in BackendVmResource.detach() method so I think it is safe to backport it.
Hi, is this patch included in latest build? I was able to re produce on rhevm-126.96.36.199-0.1.el7.noarch. If not please move to modified.
according to the log it suppose to be in 4.1.1
lets check it on your setup
it didn't make it for 188.8.131.52
Verified with rhevm-184.108.40.206-0.1.el7