Bug 1892291 - Change the representation of empty disk.usage statistics
Summary: Change the representation of empty disk.usage statistics
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.4.3.7
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ovirt-4.4.4
: 4.4.4.2
Assignee: Arik
QA Contact: Polina
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-28 12:16 UTC by Polina
Modified: 2020-12-21 12:38 UTC (History)
3 users (show)

Fixed In Version: ovirt-engine-4.4.4.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-26 22:31:22 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 112146 0 master MERGED rest-api: change the representation of empty disk.usage statistics 2021-01-29 16:18:02 UTC

Description Polina 2020-10-28 12:16:38 UTC
Description of problem:
Now statistics response for disk.usage of not running VM is <values><value><detail></detail></value></values>.
for other statistics, if there is a no value, it appears, like  <values/> or
        <values>
            <value>
                <datum>0</datum>
            </value>
        </values>

Version-Release number of selected component (if applicable):4.4.3

How reproducible:always


Steps to Reproduce:
1. Create VM on the base of last infra template (tried both latest-rhel-guest-image-8.1-infra and 8.2).
2. Send Get statistics request for the VM (not running)
https://{{host}}/ovirt-engine/api/vms/{{vmID}}/statistics.

Actual result:
   <statistic href="/ovirt-engine/api/vms/38529667-032a-4655-a22f-a17ff83f5dc8/statistics/c5dd0086-d5f0-3abf-9628-4674abb3f5ac" id="c5dd0086-d5f0-3abf-9628-4674abb3f5ac">
        <name>disks.usage</name>
        <description>Disk usage, in bytes, per filesystem as JSON (agent)</description>
        <kind>gauge</kind>
        <type>string</type>
        <unit>none</unit>
        <values>
            <value>
                <detail></detail>
            </value>
        </values>
        <vm href="/ovirt-engine/api/vms/38529667-032a-4655-a22f-a17ff83f5dc8" id="38529667-032a-4655-a22f-a17ff83f5dc8"/>
    </statistic>

Expected results:
for other statistics, if there is a no value, it appears, like  <values/> or
        <values>
            <value>
                <datum>0</datum>
            </value>
        </values>

also <unit>none</unit> must be changed to <unit>bytes</unit>

Additional info:
related to https://bugzilla.redhat.com/show_bug.cgi?id=1814565

Comment 1 Tomáš Golembiovský 2020-11-13 11:44:20 UTC
(In reply to Polina from comment #0)

> also <unit>none</unit> must be changed to <unit>bytes</unit>

As mentioned in https://bugzilla.redhat.com/show_bug.cgi?id=1814565#c13 the unit should stay "none". The value of the statistic is a general JSON string. The value is not a "size in bytes".

Comment 2 Casper (RHV QE bot) 2020-11-26 22:31:22 UTC
This bug has low overall severity and passed an automated regression suite, and is not going to be further verified by QE. If you believe special care is required, feel free to re-open to ON_QA status.

Comment 3 Sandro Bonazzola 2020-12-21 12:38:51 UTC
This bugzilla is included in oVirt 4.4.4 release, published on December 21st 2020.

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