Bug 1939286 - [RFE] Expose broken Affinity Groups via API too
Summary: [RFE] Expose broken Affinity Groups via API too
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.4.4
Hardware: x86_64
OS: Linux
Target Milestone: ovirt-4.4.8
: ---
Assignee: Saif Abusaleh
QA Contact: Polina
Depends On:
TreeView+ depends on / blocked
Reported: 2021-03-15 23:25 UTC by Germano Veit Michel
Modified: 2021-09-17 14:44 UTC (History)
8 users (show)

Fixed In Version: ovirt-engine-
Doc Type: Enhancement
Doc Text:
Previously, you could only monitor broken affinity groups using the Administration Portal. In the current release, you can now monitor broken affinity groups using both the REST API and the Administration Portal.
Clone Of:
Last Closed: 2021-09-08 14:12:04 UTC
oVirt Team: Virt
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:3460 0 None None None 2021-09-08 14:12:16 UTC
oVirt gerrit 115277 0 master MERGED api-model: add broken flag to affinity group Affinity group is considered broken when any of its rules are not satisfied 2021-07-01 06:49:55 UTC
oVirt gerrit 115278 0 master MERGED restapi: introduce broken field to Affinity Groups 2021-08-05 09:54:03 UTC

Description Germano Veit Michel 2021-03-15 23:25:07 UTC
Description of problem:

Currently Broken Affinity groups are computed by the backend[1] and exposed to the user via Admin Portal[2] only. Please consider this RFE to expose the same getBroken() via REST API.

The use case is that the user would like to monitor for Broken Affinity groups via API, without having to manually check in the Admin Portal.

[1] https://github.com/oVirt/ovirt-engine/blob/master/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/scheduling/AffinityGroup.java#L343

[2] https://github.com/oVirt/ovirt-engine/blob/68721ead04cef0378937cd331fae3170b4c275ba/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/AffinityGroupStatusColumn.java#L44

Comment 2 RHEL Program Management 2021-08-08 07:06:53 UTC
The documentation text flag should only be set after 'doc text' field is provided. Please provide the documentation text and set the flag to '?' again.

Comment 3 Polina 2021-08-23 12:35:36 UTC
verified on

<broken>true</broken> field appears now in GET https://{{host}}/ovirt-engine/api/clusters/<clusterId>/affinitygroups request, like 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <affinity_group href="/ovirt-engine/api/clusters/e46e70a5-9a47-4243-8752-efcf35879e20/affinitygroups/a2f62f7d-c6a7-4c1f-b34a-b21a9be6dc0a" id="a2f62f7d-c6a7-4c1f-b34a-b21a9be6dc0a">
        <link href="/ovirt-engine/api/clusters/e46e70a5-9a47-4243-8752-efcf35879e20/affinitygroups/a2f62f7d-c6a7-4c1f-b34a-b21a9be6dc0a/vms" rel="vms"/>
        <link href="/ovirt-engine/api/clusters/e46e70a5-9a47-4243-8752-efcf35879e20/affinitygroups/a2f62f7d-c6a7-4c1f-b34a-b21a9be6dc0a/hosts" rel="hosts"/>
        <link href="/ovirt-engine/api/clusters/e46e70a5-9a47-4243-8752-efcf35879e20/affinitygroups/a2f62f7d-c6a7-4c1f-b34a-b21a9be6dc0a/vmlabels" rel="vmlabels"/>
        <link href="/ovirt-engine/api/clusters/e46e70a5-9a47-4243-8752-efcf35879e20/affinitygroups/a2f62f7d-c6a7-4c1f-b34a-b21a9be6dc0a/hostlabels" rel="hostlabels"/>
        <cluster href="/ovirt-engine/api/clusters/e46e70a5-9a47-4243-8752-efcf35879e20" id="e46e70a5-9a47-4243-8752-efcf35879e20"/>
            <vm href="/ovirt-engine/api/vms/2bd3fb7d-34b0-4f9c-81aa-4e81f4cda936" id="2bd3fb7d-34b0-4f9c-81aa-4e81f4cda936"/>
            <vm href="/ovirt-engine/api/vms/023252bd-9f81-4813-9008-19dfa9490467" id="023252bd-9f81-4813-9008-19dfa9490467"/>

Comment 8 errata-xmlrpc 2021-09-08 14:12:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (RHV Manager (ovirt-engine) [ovirt-4.4.8]), and where to find the updated
files, follow the link below.

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


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