Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1185782

Summary: REST-API is missing image total size attribute
Product: [oVirt] ovirt-engine Reporter: Raz Tamir <ratamir>
Component: RestAPIAssignee: Eyal Shenitzky <eshenitz>
Status: CLOSED CURRENTRELEASE QA Contact: Raz Tamir <ratamir>
Severity: high Docs Contact:
Priority: high    
Version: 3.5.0CC: amureini, bugs, lpeer, lsurette, ncredi, rbalakri, Rhev-m-bugs, rhodain, srevivo, tnisan, ykaul, ylavi
Target Milestone: ovirt-4.2.0Keywords: Automation
Target Release: 4.2.0Flags: rule-engine: ovirt-4.2+
ylavi: planning_ack+
rule-engine: devel_ack+
ratamir: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-20 11:24:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
logs none

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.