Bug 1540973 - hosts rule in affinity group is always enabled in rest response API (even if disabled in UI )
Summary: hosts rule in affinity group is always enabled in rest response API (even if ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.2.1
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ovirt-4.2.3
: ---
Assignee: Andrej Krejcir
QA Contact: Polina
URL:
Whiteboard:
Depends On:
Blocks: 1493149
TreeView+ depends on / blocked
 
Reported: 2018-02-01 12:34 UTC by Polina
Modified: 2018-05-10 06:33 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: The host to VM affinity can now be explicitly disabled. Previously it was always enabled, but it had no effect if no hosts were assigned to the affinity group. Reason: Having the affinity always enabled could be confusing when using the REST API.
Clone Of:
Environment:
Last Closed: 2018-05-10 06:33:11 UTC
oVirt Team: SLA
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1540955 0 high CLOSED The Affinity Positive/Negative Value is not updated in the UI window 2021-02-22 00:41:40 UTC
oVirt gerrit 88968 0 master MERGED core: Change initial values of AffinityGroup fields. 2018-03-23 13:08:36 UTC
oVirt gerrit 88969 0 master MERGED core: Add vds_affinity_enabled column to affinity_groups table 2018-03-23 13:08:42 UTC
oVirt gerrit 88970 0 master MERGED core: Use bulk DB calls when validating affinity groups 2018-03-23 13:08:48 UTC
oVirt gerrit 88971 0 master MERGED core: Add checks if VDS affinity is enabled to various places 2018-03-23 13:08:55 UTC
oVirt gerrit 88997 0 master MERGED restapi: Host affinity rules can be disabled using the API 2018-03-23 13:09:05 UTC
oVirt gerrit 89372 0 ovirt-engine-4.2 MERGED core: Change initial values of AffinityGroup fields. 2018-04-09 15:11:20 UTC
oVirt gerrit 89373 0 ovirt-engine-4.2 MERGED core: Add vds_affinity_enabled column to affinity_groups table 2018-04-09 15:11:29 UTC
oVirt gerrit 89374 0 ovirt-engine-4.2 MERGED core: Use bulk DB calls when validating affinity groups 2018-04-09 15:11:38 UTC
oVirt gerrit 89375 0 ovirt-engine-4.2 MERGED core: Add checks if VDS affinity is enabled to various places 2018-04-09 15:11:46 UTC
oVirt gerrit 89376 0 ovirt-engine-4.2 MERGED restapi: Host affinity rules can be disabled using the API 2018-04-09 15:11:56 UTC

Internal Links: 1540955

Description Polina 2018-02-01 12:34:36 UTC
Description of problem: hosts rule in affinity group is always enabled in rest response API (even it's disabled in UI )

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

How reproducible: 100%


Steps to Reproduce:
1.Create Affinity Group (Clusters tab/Cluster. Affinity Groups tab), both rules are Disabled (VM Affinity Rule & Host Affinity Rule).
2.Send Rest API :https://{{host}}/ovirt-engine/api/clusters/355bda00-232f-4b50-91c8-acc3efd607e2/affinitygroups
3.
Actual results:Got response with <enabled>true</enabled> for host_rule instead of false:
        <description>group1</description>
        <enforcing>true</enforcing>
        <hosts_rule>
            <enabled>true</enabled>
            <enforcing>true</enforcing>
            <positive>false</positive>
        </hosts_rule>
        <vms_rule>
            <enabled>false</enabled>
            <enforcing>true</enforcing>
            <positive>false</positive>
        </vms_rule>


Expected results:<enabled>false</enabled> for both


Additional info:

Comment 1 Polina 2018-04-24 09:06:33 UTC
Verified on rhv-release-4.2.3-2-001.noarch.
When both rules are Disabled (VM Affinity Rule & Host Affinity Rule) got the correct response.
GET https://{{host}}/ovirt-engine/api/clusters/{{clusted_ID}}/affinitygroups
        <hosts_rule>
            <enabled>false</enabled>
            <enforcing>false</enforcing>
            <positive>false</positive>
        </hosts_rule>
        <vms_rule>
            <enabled>false</enabled>
            <enforcing>false</enforcing>
            <positive>false</positive>
        </vms_rule>

Comment 2 Sandro Bonazzola 2018-05-10 06:33:11 UTC
This bugzilla is included in oVirt 4.2.3 release, published on May 4th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.3 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.