Bug 1640977 - RESTAPI listing diskprofiles only shows 1 href for the same QoS even if there are more domains with the same QoS
Summary: RESTAPI listing diskprofiles only shows 1 href for the same QoS even if there...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.2.5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ovirt-4.3.0
: 4.3.0
Assignee: shani
QA Contact: Evelina Shames
URL:
Whiteboard:
Depends On:
Blocks: 1647025
TreeView+ depends on / blocked
 
Reported: 2018-10-19 10:16 UTC by Ron van der Wees
Modified: 2020-08-03 15:29 UTC (History)
5 users (show)

Fixed In Version: ovirt-engine-4.3.0_alpha
Doc Type: Bug Fix
Doc Text:
This release ensures that all values for Quality of Service links are visible.
Clone Of:
: 1647025 (view as bug list)
Environment:
Last Closed: 2019-05-08 12:38:43 UTC
oVirt Team: Storage
Target Upstream Version:
lsvaty: testing_plan_complete-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3660211 0 None None None 2018-10-19 10:30:27 UTC
Red Hat Product Errata RHEA-2019:1085 0 None None None 2019-05-08 12:39:03 UTC
oVirt gerrit 95251 0 master MERGED restapi: Show an href for all occurrences of a QoS 2020-06-01 15:49:50 UTC
oVirt gerrit 95291 0 ovirt-engine-4.2 MERGED restapi: Show an href for all occurrences of a QoS 2020-06-01 15:49:50 UTC

Description Ron van der Wees 2018-10-19 10:16:25 UTC
Description of problem:
When listing diskprofiles on storage domain that have a QoS set, the href for
this QoS is not show for each entry listed. Only once per QoS.
The ID is always shown.

Version-Release number of selected component (if applicable):
ovirt-engine-restapi-4.2.5.2-0.1.el7ev.noarch

How reproducible:
Always

Steps to Reproduce:
1. Define 3 storage domain "Data1", "Data2" and "Data3"
2. Under Compute -> Data Center -> Default -> QoS
   define 2 storage QoS entries (with random parameters) named
   "QoS1" and "QoS2"
3. Under Storage -> Domains set:
   Data1 -> Disk Profiles -> QoS -> "QoS1"
   Data2 -> Disk Profiles -> QoS -> "QoS2"
   Data3 -> Disk Profiles -> QoS -> "QoS3"
4. Use the API to list the disk diskprofiles:
   curl -k --header 'Accept: application/xml' --request 'GET' -u 'admin@internal' \
     'https://rhvm.example.com/ovirt-engine/api/diskprofiles'

Actual results:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<disk_profiles>
    <disk_profile href="/ovirt-engine/api/diskprofiles/bb314a2b-f8fe-4b34-866e-5525f21fe08d" id="bb314a2b-f8fe-4b34-866e-5525f21fe08d">
        <name>hosted_storage</name>
        <link href="/ovirt-engine/api/diskprofiles/bb314a2b-f8fe-4b34-866e-5525f21fe08d/permissions" rel="permissions"/>
        <storage_domain href="/ovirt-engine/api/storagedomains/9c04b9ed-ab44-4a72-b253-ac8635690583" id="9c04b9ed-ab44-4a72-b253-ac8635690583"/>
    </disk_profile>
    <disk_profile href="/ovirt-engine/api/diskprofiles/bc52f83c-52ec-4ed3-baac-764b69551ba2" id="bc52f83c-52ec-4ed3-baac-764b69551ba2">
        <name>Data1</name>
        <link href="/ovirt-engine/api/diskprofiles/bc52f83c-52ec-4ed3-baac-764b69551ba2/permissions" rel="permissions"/>
        <qos id="1b8c9ecb-ed09-44d2-8d78-280bbf20995c"/>
         ^^^
           \--> no "href" shown

        <storage_domain href="/ovirt-engine/api/storagedomains/57854d4a-2934-45d9-91c1-fab1e3563446" id="57854d4a-2934-45d9-91c1-fab1e3563446"/>
    </disk_profile>
    <disk_profile href="/ovirt-engine/api/diskprofiles/31311c34-911d-4cfe-ba84-75b0ede0d118" id="31311c34-911d-4cfe-ba84-75b0ede0d118">
        <name>Data3</name>
        <link href="/ovirt-engine/api/diskprofiles/31311c34-911d-4cfe-ba84-75b0ede0d118/permissions" rel="permissions"/>
        <qos href="/ovirt-engine/api/datacenters/1d9f9f52-a611-11e8-b40b-00163e4663ae/qoss/1b8c9ecb-ed09-44d2-8d78-280bbf20995c" id="1b8c9ecb-ed09-44d2-8d78-280bbf20995c"/>
         ^^^^^^^^
              \--> "href" is shown for id *280bbf20995c only once!!!

        <storage_domain href="/ovirt-engine/api/storagedomains/e345a3da-805e-4206-8f91-41e309bce10b" id="e345a3da-805e-4206-8f91-41e309bce10b"/>
    </disk_profile>
    <disk_profile href="/ovirt-engine/api/diskprofiles/668383da-d1b2-4608-b950-b8109d7f3118" id="668383da-d1b2-4608-b950-b8109d7f3118">
        <name>Data2</name>
        <link href="/ovirt-engine/api/diskprofiles/668383da-d1b2-4608-b950-b8109d7f3118/permissions" rel="permissions"/>
        <qos href="/ovirt-engine/api/datacenters/1d9f9f52-a611-11e8-b40b-00163e4663ae/qoss/4c413898-c092-4f6b-8df5-efdd2c0602bb" id="4c413898-c092-4f6b-8df5-efdd2c0602bb"/>
         ^^^^^^^^
              \--> "href" is shown for id *-efdd2c0602bb

        <storage_domain href="/ovirt-engine/api/storagedomains/486988f8-ea63-4521-be30-95b66b62b85e" id="486988f8-ea63-4521-be30-95b66b62b85e"/>
    </disk_profile>
</disk_profiles>


Expected results:
The "href" for the QoS entry under all "disk_profiles" to be shown as it would
with for example "data_center" under "/ovirt-engine/api/storagedomains"


Additional info:
The same issue with JSON output when using --header 'Accept: application/json'

Comment 3 Evelina Shames 2018-11-22 14:01:33 UTC
Verified on engine 4.3.0-0.0

Comment 4 Raz Tamir 2018-11-26 16:32:01 UTC
QE verification bot: the bug was verified upstream

Comment 5 RHV bug bot 2018-12-10 15:12:44 UTC
WARN: Bug status (VERIFIED) wasn't changed but the folowing should be fixed:

[Found non-acked flags: '{'rhevm-4.3-ga': '?'}', ]

For more info please contact: rhv-devops@redhat.comINFO: Bug status (VERIFIED) wasn't changed but the folowing should be fixed:

[Found non-acked flags: '{'rhevm-4.3-ga': '?'}', ]

For more info please contact: rhv-devops@redhat.com

Comment 6 RHV bug bot 2019-01-15 23:35:08 UTC
WARN: Bug status (VERIFIED) wasn't changed but the folowing should be fixed:

[Found non-acked flags: '{'rhevm-4.3-ga': '?'}', ]

For more info please contact: rhv-devops@redhat.comINFO: Bug status (VERIFIED) wasn't changed but the folowing should be fixed:

[Found non-acked flags: '{'rhevm-4.3-ga': '?'}', ]

For more info please contact: rhv-devops@redhat.com

Comment 8 errata-xmlrpc 2019-05-08 12:38:43 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, and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHEA-2019:1085

Comment 9 Daniel Gur 2019-08-28 13:14:12 UTC
sync2jira

Comment 10 Daniel Gur 2019-08-28 13:18:29 UTC
sync2jira


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