Bug 974058

Summary: qcow2 images size reported by glance should match the virtual image size
Product: Red Hat OpenStack Reporter: Giulio Fidente <gfidente>
Component: openstack-glanceAssignee: Flavio Percoco <fpercoco>
Status: CLOSED WONTFIX QA Contact: Giulio Fidente <gfidente>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.0CC: abaron, eglynn, fpercoco, scohen, slong
Target Milestone: async   
Target Release: 5.0 (RHEL 7)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-15 08:22:54 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: 1048174    
Bug Blocks:    

Description Giulio Fidente 2013-06-13 11:10:35 UTC
Description of problem:
the image size of qcow2 images should match the virtual size reported by qemu-img not the actual data size

# glance image-show ff8f8fb3-76a3-47c0-bfc2-7bbbb9e46950
[...]
| size | 699592704 |
[...]

# qemu-img info /var/lib/glance/images/ff8f8fb3-76a3-47c0-bfc2-7bbbb9e46950
image: /var/lib/glance/images/ff8f8fb3-76a3-47c0-bfc2-7bbbb9e46950
file format: qcow2
virtual size: 6.0G (6442450944 bytes)
disk size: 667M
cluster_size: 65536


Version-Release number of selected component (if applicable):
openstack-glance-2013.1.2-1.el6ost.noarch

Comment 1 John Bresnahan 2013-06-24 19:47:37 UTC
The right fix for this is dependent upon more complicated work that is underway for havana.  There is an import/export effort in which incoming images can be verified/converted as opposed to just uploaded.  This is a very good place to verify things like the image size.  This is also coupled with the async workers blueprint: https://blueprints.launchpad.net/glance/+spec/async-glance-workers.

Comment 2 Flavio Percoco 2013-11-29 10:24:04 UTC
Also, I'd argue that using the size field is the right thing to do. The size is also important to know what the file size is. For example, using the image size instead of the file size would break all features that rely on that (Progress bar, for example).

It may be necessary to explicitly differentiate the image_size from the file_size, which in many cases will be the same.

Comment 3 Flavio Percoco 2013-12-13 09:34:24 UTC
This will be fixed as part of this blueprint:

https://blueprints.launchpad.net/glance/+spec/split-image-size

Comment 4 Flavio Percoco 2014-01-15 08:22:54 UTC
I'm closing this as WONTFIX because the image size won't match the virtual_size. Instead, the proposed blueprint will add a new virtual_size attribute that will hold this information.

Comment 5 Summer Long 2014-07-23 04:25:12 UTC
Flavio, I'm moving requires_doc_text to - since nothing was done. Unless you you want to set it as a Known Issue with text? Is there a specific user problem that you'd like to point out? (Release notes are regenerated with each maintenance release if you want to include info.)

Comment 6 Red Hat Bugzilla 2023-09-14 01:45:31 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days