Description of problem: In automation testing we update vm affinity to migratable via rest. It failed to update vm with error: VmPlacementPolicy [host.id|name] required for validateAndUpdateHostsInPlacementPolicy Version-Release number of selected component (if applicable): 3.6.0.4 oVirt Engine Version: 3.6.0-0.0.master.20150726172446.git65db93d.el6 How reproducible: All the time Actual results: Failed to update host Expected results: Update succeed Additional info: Rest request: <vm id="c8d1f344-069d-4e14-a515-b88b66195d09"> <placement_policy> <host/> <affinity>pinned</affinity> </placement_policy> </vm> also with: <hosts> <host/> </hosts>
Verify with: RHEVM 3.6: rhevm-3.6.0-0.18.el6.noarch VDSM: vdsm-4.17.10-5.el7ev libvirt: libvirt-1.2.17-5.el7 1. Send request via REST to pin VM host in list : <vm id="d3f958c9-96de-4665-8d50-bbc855eb184d"> <placement_policy> <affinity>pinned</affinity> <hosts> <host > <name>host_1</name> </host> </hosts> </placement_policy> </vm> The VM affinity update to 'pinned' from 'migratable'. But the host list did not appear in VM, only in GUI. 2. Send request back to migratable --> PASS 3. Send request to pin VM with empty host list: <vm id="d3f958c9-96de-4665-8d50-bbc855eb184d"> <placement_policy> <affinity>pinned</affinity> </hosts> </placement_policy> </vm> The VM affinity update to 'pinned' from 'migratable'. But the host list did not appear in VM, only in GUI. If we send request with element 'host' for backwards compatibility We failed with error: "Cannot edit VM. VM is pinned to a specific host. The required host doesn't exist" There is opened BZ about it: https://bugzilla.redhat.com/show_bug.cgi?id=1260732 Opening new bug: Host list don't appear under placement_policy after update VM to pinned https://bugzilla.redhat.com/show_bug.cgi?id=1275733