Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1301992

Summary: The vm.placement_policy.affinity element isn't populated
Product: [oVirt] ovirt-engine Reporter: Juan Hernández <juan.hernandez>
Component: RestAPIAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED CURRENTRELEASE QA Contact: Artyom <alukiano>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.6.1CC: bugs, gklein, mavital, mgoldboi, nicolas, oourfali, sbonazzo, v.astafiev
Target Milestone: ovirt-3.6.3Keywords: Regression, Triaged
Target Release: 3.6.3Flags: rule-engine: ovirt-3.6.z+
rule-engine: blocker+
mgoldboi: planning_ack+
oourfali: devel_ack+
mavital: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-18 11:16:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1305535    

Description Juan Hernández 2016-01-26 13:51:49 UTC
The vm.placement_policy.affinity element should be populated, but it isn't.

The expected output is something like this:

  GET /vms/{vm:id}
  <vm>
    ...
    <placement_policy>
      <affinity>migratable|user_migratable|pinned</affinity>
    </placement_policy>
    ...
  </vm>

But the actual output is like this:

  GET /vms/{vm:id}
  <vm>
    ...
    <placement_policy/>
    ...
  </vm>

I think that this regression was introduced in version 3.6.1 of the engine by the following change:

  https://gerrit.ovirt.org/46722
  https://gerrit.ovirt.org/#/c/46722/2/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java

Comment 1 Red Hat Bugzilla Rules Engine 2016-01-26 13:51:51 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 2 Juan Hernández 2016-01-26 15:16:37 UTC
This bug causes an issue in the ManageIQ oVirt provider:

  [Capablanca] - Refresh relationships fails for oVirt (RHEV) provider
  https://github.com/ManageIQ/manageiq/issues/5741

Comment 3 Artyom 2016-02-01 13:17:24 UTC
Verified on rhevm-restapi-3.6.3-0.1.el6.noarch
output of get
<placement_policy>
<affinity>pinned</affinity>
</placement_policy>