Bug 1048174
| Summary: | [RFE][glance] Split image's size into 2 separate attributes | |||
|---|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Flavio Percoco <fpercoco> | |
| Component: | openstack-glance | Assignee: | Flavio Percoco <fpercoco> | |
| Status: | CLOSED ERRATA | QA Contact: | Tzach Shefi <tshefi> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 4.0 | CC: | adahms, ddomingo, dnavale, dron, eglynn, fpercoco, rhos-integ, scohen, yeylon | |
| Target Milestone: | Upstream M3 | Keywords: | FutureFeature, Triaged | |
| Target Release: | 5.0 (RHEL 7) | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| URL: | https://blueprints.launchpad.net/glance/+spec/split-image-size | |||
| Whiteboard: | upstream_milestone_icehouse-3 upstream_status_implemented upstream_definition_approved | |||
| Fixed In Version: | openstack-glance-2014.1-2.el7ost | Doc Type: | Enhancement | |
| Doc Text: |
Previously, the size of a Glance image would be incorrectly reported under certain circumstances. This was caused by differences in the file size and the virtual size of the image.
The size of an image can refer to either the size of the file or the size of the actual image, which may not be the same in cases such as qcow2. This update splits the current size attribute into two separate attributes: image_size and file_size. The former refers to the real size of the image and the later the actual size of the uploaded file. In most cases, both fields will hold the same value. However, there are also many cases in which this value will differ.
This update considers both attributes important for an image, but not required for that image to exist. The value of the image_size attribute allows users to know the actual size of the image and how much space is needed to use that image, such as Cinder block allocation. The value of the file_size attribute is necessary to support quotas, CLI progress bars, rate-limits, and metering, etc.
While the actual image size could be included as part of the image properties or meta data, it is important to remember that the image_size attribute is a first-class citizen attribute in most external tools. A discrete attribute will ease the consumption of its value from Nova, Cinder and other tools that rely on the value of that attribute.
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 1082851 (view as bug list) | Environment: | ||
| Last Closed: | 2014-07-08 15:32:10 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 974058, 1082851 | |||
|
Description
Flavio Percoco
2014-01-03 10:21:21 UTC
Both patches merged upstream, ready to be tested. *** Bug 1041743 has been marked as a duplicate of this bug. *** Changed to started, writing a new plan for it. Test plan for RFE https://tcms.engineering.redhat.com/plan/13496/openstack-storage-glance-image-size-split-2-separate-attributes#testcases Verified on:
RHEL7
python-glance-2014.1-2.el7ost.noarch
python-glanceclient-0.12.0-1.el7ost.noarch
openstack-glance-2014.1-2.el7ost.noarch
1. created an image
2. using sql command to add virtual_size (glance client side not ready yet)
mysql connect to glance
select * from images;
update images set virtual_size=90 where id='f4cd22e6-4d73-4f49-8029-4cf3f1f56bec';
3. glance image-show api2 indeed shows virtual_size = 90 like added above.
x-openstack-request-id: req-99d3a8e1-62f1-4c3d-884f-0d651e609249
{"status": "queued", "name": "image_test1", "tags": [], "container_format": "bare", "created_at": "2014-06-15T13:37:36Z", "disk_format": "qcow2", "updated_at": "2014
f": "/v2/images/f4cd22e6-4d73-4f49-8029-4cf3f1f56bec", "min_disk": 0, "protected": false, "id": "f4cd22e6-4d73-4f49-8029-4cf3f1f56bec", "file": "/v2/images/f4cd22e6-
366d7a9595424eb95b6709725c8d51", "virtual_size": 90, "min_ram": 0, "schema": "/v2/schemas/image"}
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| container_format | bare |
| created_at | 2014-06-15T13:37:36Z |
| disk_format | qcow2 |
| id | f4cd22e6-4d73-4f49-8029-4cf3f1f56bec |
| min_disk | 0 |
| min_ram | 0 |
| name | image_test1 |
| owner | 0c366d7a9595424eb95b6709725c8d51 |
| protected | False |
| size | 190 |
| status | queued |
| tags | [] |
| updated_at | 2014-06-15T13:37:36Z |
| virtual_size | 90 |
| visibility | public |
+------------------+--------------------------------------+
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. http://rhn.redhat.com/errata/RHEA-2014-0851.html |