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): rhevm-4.1.0.4-0.1.el7 How reproducible: always 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: https://{engine_url}/ovirt-engine/api/vms/{vm_id}/detach body: <action> <async>false</async> <grace_period> <expiry>10</expiry> </grace_period> </action> Actual results: Vms are detached from the pool, but the pool itself keep remaining in the system. Expected results: Vms are detached from the pool and the pool itself is removed from the system. Additional info:
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), to 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-4.1.1.2-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 4.1.1.2
Verified with rhevm-4.1.1.3-0.1.el7