Bug 1249521 - [REST API] Update vm affinity to 'vm_affinity_migratable' failed since host tag is empty
[REST API] Update vm affinity to 'vm_affinity_migratable' failed since host t...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.6.0
Unspecified Unspecified
urgent Severity high
: ovirt-3.6.0-rc
: 3.6.0
Assigned To: Dudi Maroshi
Israel Pinto
: AutomationBlocker, Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-03 05:02 EDT by Israel Pinto
Modified: 2016-04-19 21:10 EDT (History)
12 users (show)

See Also:
Fixed In Version: 3.6.0-11
Doc Type: Bug Fix
Doc Text:
Updated the REST API code to enable a virtual machine's affinity to be updated from 'migratable' to 'pinned' when supplying an empty <hosts/> and a valid <host> tag.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-04-19 21:10:12 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: SLA
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 45128 master MERGED restapi: allow new VM with no dedicated host in migration policy Never
oVirt gerrit 45256 ovirt-engine-3.6 MERGED restapi: allow new VM with no dedicated host in migration policy Never

  None (edit)
Description Israel Pinto 2015-08-03 05:02:44 EDT
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>
Comment 2 Israel Pinto 2015-10-27 11:21:54 EDT
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

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