Red Hat Bugzilla – Bug 974058
qcow2 images size reported by glance should match the virtual image size
Last modified: 2016-04-26 11:08:35 EDT
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
file format: qcow2
virtual size: 6.0G (6442450944 bytes)
disk size: 667M
Version-Release number of selected component (if applicable):
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.
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.
This will be fixed as part of this blueprint:
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.
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.)