Bug 1185782 - REST-API is missing image total size attribute
Summary: REST-API is missing image total size attribute
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.2.0
: 4.2.0
Assignee: Eyal Shenitzky
QA Contact: Raz Tamir
URL:
Whiteboard:
: 1519329 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-26 09:47 UTC by Raz Tamir
Modified: 2019-04-28 13:53 UTC (History)
12 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-12-20 11:24:26 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.2+
ylavi: planning_ack+
rule-engine: devel_ack+
ratamir: testing_ack+


Attachments (Terms of Use)
logs (994.44 KB, application/x-bzip)
2015-01-26 09:47 UTC, Raz Tamir
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 80991 0 master MERGED restapi: Add total_size attribute for disk object 2020-09-09 07:54:09 UTC
oVirt gerrit 80993 0 master MERGED restapi: Add totalSize attribute to disks resource 2020-09-09 07:54:08 UTC
oVirt gerrit 81080 0 master MERGED restapi: Add totalSize attribute to disk resource 2020-09-09 07:54:08 UTC
oVirt gerrit 81134 0 master MERGED restapi: Update to model 4.2.16 and metamodel 1.2.10 2020-09-09 07:54:08 UTC

Description Raz Tamir 2015-01-26 09:47:56 UTC
Created attachment 984136 [details]
logs

Description of problem:
Disk's actual_size in UI showes the disk total used space and in REST api the  actual_size represent the leaf volume size.



Version-Release number of selected component (if applicable):
vt13.8


How reproducible:
100%


Steps to Reproduce:
1. create vm with disk (sparse + os or just dd few GB)
2. create snapshot
3.

Actual results:
Before the snapshot the actual in UI: 3GB in REST: 3GB
After the snapshot the actual size in UI: 4GB in REST: 1GB


Expected results:


Additional info:

Comment 1 Allon Mureinik 2015-01-27 06:18:47 UTC
Tal, IIRC, the REST API displays volumes, not images, so isn't this the expected behavior?

Comment 2 Tal Nisan 2015-01-27 08:36:10 UTC
Seems so and since it's showing the leaf volume the size is 1GB

Comment 3 Allon Mureinik 2015-01-27 10:11:29 UTC
(In reply to Tal Nisan from comment #2)
> Seems so and since it's showing the leaf volume the size is 1GB

So let's verify it acts the same in 3.4.0, and close this.

Comment 4 Aharon Canan 2015-02-24 15:51:29 UTC
We agree with comment #1 but - 

We have no way to get the image actual size (like we get in the UI).
Here, we get different volume each time although we are checking the same image and volume ID.

Comment 5 Yaniv Lavi 2016-12-06 09:25:13 UTC
This is a bug, not a feature.
This is needed to automate the feature testing.
Changing the ticket to reflect this.

Comment 6 Allon Mureinik 2017-09-13 11:32:27 UTC
The REST API is self-documenting, I don't think we need to add any external documentation to this.
Setting required-doctext-

Comment 7 Allon Mureinik 2017-09-14 16:38:05 UTC
This patch broke OST. It was partially reverted, and needs to be rethought.

Comment 8 Raz Tamir 2017-09-18 12:36:35 UTC
Verified on ovirt-engine-4.2.0-0.0.master.20170915203601.git96df02d.el7.centos

The <total_size> attr in rest api is now sexist and shows the total image size

Comment 9 Allon Mureinik 2017-12-04 14:53:53 UTC
*** Bug 1519329 has been marked as a duplicate of this bug. ***

Comment 10 Sandro Bonazzola 2017-12-20 11:24:26 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, 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.