Bug 1275733
Summary: | [REST API] Host list don't appear under placement_policy after update VM to pinned | ||||||
---|---|---|---|---|---|---|---|
Product: | [oVirt] ovirt-engine | Reporter: | Israel Pinto <ipinto> | ||||
Component: | RestAPI | Assignee: | Andrej Krejcir <akrejcir> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Petr Matyáš <pmatyas> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 3.6.0 | CC: | bugs, ipinto, juan.hernandez, pmatyas, rgolan | ||||
Target Milestone: | ovirt-3.6.1 | Flags: | dfediuck:
ovirt-3.6.z?
rule-engine: planning_ack? rule-engine: devel_ack+ rule-engine: testing_ack+ |
||||
Target Release: | 3.6.1 | ||||||
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:11:45 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: | |||||||
Attachments: |
|
Description
Israel Pinto
2015-10-27 15:20:33 UTC
Created attachment 1086880 [details]
engine_log
Currently if a VM is pinned to just one host then the RESTAPI will use the single "host" element: GET /vms/{vm:id} <vm> <placement_policy> <host id="..." href="..."/> <affinity>pinned</affinity> </plaement_policy> </vm> Only if it is pinned to more than hone host the multiple "hosts" element will be used: GET /vms/{vm:id} <vm> <placement_policy> <hosts> <host id="..." href="..."/> <host id="..." href="..."/> </hosts> <affinity>pinned</affinity> </plaement_policy> </vm> Is that what you are getting? I think that it it is better to always populate the multiple "hosts" element, even if it only has one element. (In reply to Juan Hernández from comment #2) > Currently if a VM is pinned to just one host then the RESTAPI will use the > single "host" element: > > GET /vms/{vm:id} > <vm> > <placement_policy> > <host id="..." href="..."/> > <affinity>pinned</affinity> > </plaement_policy> > </vm> > > Only if it is pinned to more than hone host the multiple "hosts" element > will be used: > > GET /vms/{vm:id} > <vm> > <placement_policy> > <hosts> > <host id="..." href="..."/> > <host id="..." href="..."/> > </hosts> > <affinity>pinned</affinity> > </plaement_policy> > </vm> > > Is that what you are getting? > > I think that it it is better to always populate the multiple "hosts" > element, even if it only has one element. I did see host/hosts elemtemt at all. Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release. I can't reproduce that. Please check with the following script and report the results: ---8<--- #!/bin/sh -ex url="https://engine.example.com/ovirt-engine/api" user="admin@internal" password="******" curl \ --verbose \ --cacert /etc/pki/ovirt-engine/ca.pem \ --request PUT \ --user "${user}:${password}" \ --header "Accept: application/xml" \ --header "Content-Type: application/xml" \ --data ' <vm> <placement_policy> <affinity>pinned</affinity> <hosts> <host> <name>host_1</name> </host> </hosts> </placement_policy> </vm> ' \ "${url}/vms/{vm:id}" --->8--- (In reply to Juan Hernández from comment #5) > I can't reproduce that. Please check with the following script and report > the results: > <vm> > <placement_policy> > <affinity>pinned</affinity> > <hosts> > <host> > <name>host_1</name> > </host> > </hosts> > </placement_policy> > </vm> > ' \ > "${url}/vms/{vm:id}" > --->8--- what version your using? I tested this with the latest 3.6 build: # rpm -q rhevm rhevm-3.6.0.2-0.1.el6.noarch Verified on 3.6.2-10 |