Can not create an instance from image whose type is snapshot

Bug #1791603 reported by Boxiang Zhu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
New
Undecided
Unassigned

Bug Description

ENV: created by devstack
OS: CentOS 7

Steps as below:
1. create a bootable volume with cirros images, size of volume is 1 GiB.
2. launch an instance with the bootable volume.
3. create a snapshot for the instance.
4. try to launch an instance with the snapshot, but failed. The error msg is as below:
Sep 10 17:17:45 dev <email address hidden>[1631]: INFO nova.api.openstack.wsgi [None req-5e6bf7c4-dcf8-404f-9ac0-5954d9651149 admin admin] HTTP exception thrown: Volume is smaller than the minimum size specified in image metadata. Volume size is 1073741824 bytes, minimum size is 10737418240 bytes.
Sep 10 17:17:45 dev <email address hidden>[1631]: DEBUG nova.api.openstack.wsgi [None req-5e6bf7c4-dcf8-404f-9ac0-5954d9651149 admin admin] Returning 400 to user: Volume is smaller than the minimum size specified in image metadata. Volume size is 1073741824 bytes, minimum size is 10737418240 bytes. {{(pid=1639) __call__ /opt/stack/nova/nova/api/openstack/wsgi.py:1077}}

I have tried all flavors such as 1 CPU 1 GiB Mem 10 GiB disk.

My fault or a bug?

Revision history for this message
Eric Harney (eharney) wrote :

The image's min_disk property is set to 10GB, so trying to create a 1GB volume from the image is expected to fail.

Changed in cinder:
status: New → Invalid
Boxiang Zhu (bxzhu-5355)
Changed in cinder:
status: Invalid → New
Revision history for this message
Boxiang Zhu (bxzhu-5355) wrote :

hi Eric, I was not attempt to create 1 GB volume for image whose min_disk property is 10GB.

I created an instance with 1GB volume, flavor(1 CPU 1 GB mem 10 GB disk) and cirros image which has not min_disk limit. It is successful. Then I created a snapshot of the instance which may be named as 'snap01'. Then I try to launch an instance with the snapshot 'snap01'. It is failure.

Please notice that if you choose the flavor(1CPU 1GB 10GB disk), the size of volume will be set 10GB. You must manually set the volume size to 1GB.

The image has a metadata named 'block_device_mapping' which has volume_size property(1GB).

I think the flow checks the volume_size of metadata(1GB) with the min_disk of the snapshot(10GB). but I set the volume to 10GB. Why not check the volume which will be created with the min_disk of snapshot?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.