Bug 1769212 - Rest API for creating affinity group with labels is resulted with the group created with missing labels
Summary: Rest API for creating affinity group with labels is resulted with the group c...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.3.7.1
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ovirt-4.4.0
: ---
Assignee: Andrej Krejcir
QA Contact: Polina
URL:
Whiteboard:
Depends On:
Blocks: 1781380
TreeView+ depends on / blocked
 
Reported: 2019-11-06 07:43 UTC by Polina
Modified: 2020-05-20 20:00 UTC (History)
3 users (show)

Fixed In Version: ovirt-engine 4.4.0-27 22b6f82
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 1781380 (view as bug list)
Environment:
Last Closed: 2020-05-20 20:00:48 UTC
oVirt Team: Virt
Embargoed:
pm-rhel: ovirt-4.4+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 105065 0 master MERGED restapi: Affinity group mapper reads labels 2020-05-14 13:35:35 UTC
oVirt gerrit 105449 0 'None' MERGED restapi: Affinity group mapper reads labels 2020-05-14 13:35:35 UTC

Description Polina 2019-11-06 07:43:43 UTC
Description of problem: the Affinity Group created by Rest API has no labels even they are defined in the request body


Version-Release number of selected component (if applicable):
ovirt-engine-4.3.7.1-0.1.el7.noarch

How reproducible:100%


Steps to Reproduce:
1.Create Label (host or vm or both) in Compute/Clusters/Cluster/Affinity Labels tag
2.POST https://{{host}}/ovirt-engine/api/clusters/9684ce59-4549-4204-bb6f-9a6f685a27c8/affinitygroups
<affinity_group>
    <name>test_2</name>
    <enforcing>true</enforcing>
    <hosts_rule>
        <enabled>true</enabled>
        <enforcing>true</enforcing>
        <positive>true</positive>
    </hosts_rule>
    <positive>true</positive>
    <priority>1</priority>
    <vms_rule>
        <enabled>true</enabled>
        <enforcing>true</enforcing>
        <positive>true</positive>
    </vms_rule>
    <host_labels>
        <affinity_label id="90e8e1ee-0968-47c1-ac57-685d817179bf"/>
    </host_labels>
    <hosts/>
    <vm_labels>
        <affinity_label id="90e8e1ee-0968-47c1-ac57-685d817179bf"/>
    </vm_labels>
    <vms/>
</affinity_group>


Actual results:
The responce is 201 but the labels are missing 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<affinity_group href="/ovirt-engine/api/clusters/9684ce59-4549-4204-bb6f-9a6f685a27c8/affinitygroups/724d8529-acf4-49d3-b46c-dc91478cb2ae" id="724d8529-acf4-49d3-b46c-dc91478cb2ae">
    <name>test_2</name>
    <link href="/ovirt-engine/api/clusters/9684ce59-4549-4204-bb6f-9a6f685a27c8/affinitygroups/724d8529-acf4-49d3-b46c-dc91478cb2ae/hostlabels" rel="hostlabels"/>
    <link href="/ovirt-engine/api/clusters/9684ce59-4549-4204-bb6f-9a6f685a27c8/affinitygroups/724d8529-acf4-49d3-b46c-dc91478cb2ae/vmlabels" rel="vmlabels"/>
    <link href="/ovirt-engine/api/clusters/9684ce59-4549-4204-bb6f-9a6f685a27c8/affinitygroups/724d8529-acf4-49d3-b46c-dc91478cb2ae/vms" rel="vms"/>
    <enforcing>true</enforcing>
    <hosts_rule>
        <enabled>true</enabled>
        <enforcing>true</enforcing>
        <positive>true</positive>
    </hosts_rule>
    <positive>true</positive>
    <priority>1</priority>
    <vms_rule>
        <enabled>true</enabled>
        <enforcing>true</enforcing>
        <positive>true</positive>
    </vms_rule>
    <cluster href="/ovirt-engine/api/clusters/9684ce59-4549-4204-bb6f-9a6f685a27c8" id="9684ce59-4549-4204-bb6f-9a6f685a27c8"/>
    <host_labels/>
    <hosts/>
    <vm_labels/>
    <vms/>
</affinity_group>


Expected results:
the group must contain labels

Additional info:

Comment 3 Michal Skrivanek 2020-03-10 12:25:37 UTC
change SLA team to virt, we're not tracking SLA separately anymore

Comment 4 Sandro Bonazzola 2020-03-20 15:15:36 UTC
This bug is targeted to 4.4.1 and in modified state. can we re-target to 4.4.0 and move to QA?

Comment 5 Polina 2020-03-29 20:04:04 UTC
verified on http://bob-dr.lab.eng.brq.redhat.com/builds/4.4/rhv-4.4.0-27

Comment 6 Sandro Bonazzola 2020-05-20 20:00:48 UTC
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020.

Since the problem described in this bug report should be
resolved in oVirt 4.4.0 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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