Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1353937 - while creating volume from image, cinder do not fetch/consider "virtual-size" of image
Summary: while creating volume from image, cinder do not fetch/consider "virtual-size"...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-cinder
Version: 7.0 (Kilo)
Hardware: All
OS: Linux
low
high
Target Milestone: ---
: 8.0 (Liberty)
Assignee: Eric Harney
QA Contact: Avi Avraham
URL:
Whiteboard:
Depends On:
Blocks: 1365268
TreeView+ depends on / blocked
 
Reported: 2016-07-08 13:04 UTC by Pratik Pravin Bandarkar
Modified: 2018-09-24 07:11 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1365268 (view as bug list)
Environment:
Last Closed: 2018-08-23 19:06:41 UTC
Target Upstream Version:
tshefi: automate_bug-


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Launchpad 1599147 None None None 2016-07-08 19:05:12 UTC
OpenStack gerrit 311152 None None None 2016-08-01 14:55:07 UTC

Description Pratik Pravin Bandarkar 2016-07-08 13:04:54 UTC
Description of problem:
 During the vm creation from the image and create volume, cinder do not fetch "virtual-size" of the image.

Version-Release number of selected component (if applicable):
RHOS7

How reproducible:
100%

Steps to Reproduce:
1. 
# qemu-img info cirros 
image: cirros
file format: qcow2
virtual size: 3.0G (3262351872 bytes) <============
disk size: 13M
cluster_size: 65536
Format specific information:
    compat: 0.10
    refcount bits: 16


upload the image to glance. 
[root@rhos7 ~(keystone_admin)]# glance image-create --disk-format qcow2 --container-format bare --file cirros  --name cirros

2. Try to create new volume from image. It will fail.
3. Try to create new instance.(boot from image - create new volume). The operation will fail.

<snip>
2016-07-08 01:53:21.827 13415 INFO cinder.image.image_utils [req-7ff2f1df-6c9c-4caa-8c48-4f22c50a6fef c42615c5052841468c716c935b43d9f7 910e8c8b7875437ab4f091ea2290e563 - - -] Image download 12.00 MB at 12.00 MB/
s
2016-07-08 01:53:21.946 13415 ERROR cinder.volume.flows.manager.create_volume [req-7ff2f1df-6c9c-4caa-8c48-4f22c50a6fef c42615c5052841468c716c935b43d9f7 910e8c8b7875437ab4f091ea2290e563 - - -] Failed to copy ima
ge to volume: 410567c3-e78a-42fe-8b4b-573e0523f934
2016-07-08 01:53:21.946 13415 TRACE cinder.volume.flows.manager.create_volume Traceback (most recent call last):
2016-07-08 01:53:21.946 13415 TRACE cinder.volume.flows.manager.create_volume   File "/usr/lib/python2.7/site-packages/cinder/volume/flows/manager/create_volume.py", line 501, in _copy_image_to_volume
2016-07-08 01:53:21.946 13415 TRACE cinder.volume.flows.manager.create_volume     copy_image_to_volume(context, volume_ref, image_service, image_id)
2016-07-08 01:53:21.946 13415 TRACE cinder.volume.flows.manager.create_volume   File "/usr/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapper
2016-07-08 01:53:21.946 13415 TRACE cinder.volume.flows.manager.create_volume     return f(*args, **kwargs)
2016-07-08 01:53:21.946 13415 TRACE cinder.volume.flows.manager.create_volume   File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/lvm.py", line 381, in copy_image_to_volume
2016-07-08 01:53:21.946 13415 TRACE cinder.volume.flows.manager.create_volume     size=volume['size'])
2016-07-08 01:53:21.946 13415 TRACE cinder.volume.flows.manager.create_volume   File "/usr/lib/python2.7/site-packages/cinder/image/image_utils.py", line 226, in fetch_to_raw
2016-07-08 01:53:21.946 13415 TRACE cinder.volume.flows.manager.create_volume     run_as_root=run_as_root)
2016-07-08 01:53:21.946 13415 TRACE cinder.volume.flows.manager.create_volume   File "/usr/lib/python2.7/site-packages/cinder/image/image_utils.py", line 293, in fetch_to_volume_format
2016-07-08 01:53:21.946 13415 TRACE cinder.volume.flows.manager.create_volume     raise exception.ImageUnacceptable(image_id=image_id, reason=reason)
2016-07-08 01:53:21.946 13415 TRACE cinder.volume.flows.manager.create_volume ImageUnacceptable: Image 54954bdc-d4df-4551-8170-fbbf33fc955b is unacceptable: Size is 3GB and doesn't fit in a volume of size 1GB.
2016-07-08 01:53:21.946 13415 TRACE cinder.volume.flows.manager.create_volume 
</snip>


- The operation will be successful if we specify size of volume > than "virtual-size" of glance image.

Actual results:
while creating volume from image, cinder do not fetch/consider "virtual-size" of image

Expected results:
while creating volume from image, cinder should consider "virtual-size" of image.

Additional info:

Comment 7 Tzach Shefi 2018-09-24 07:11:33 UTC
Despite my shared wish to have this fixed, an underlying design issue which won't be changed anytime soon means this was closed as NOTABUG. 

As such for the time being nothing for QE to test/automate.


Note You need to log in before you can comment on or make changes to this bug.