Nova returns wrong message when flavor's disk is less than image size

Bug #1613668 reported by ShuaiSun
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Expired
Undecided
Unassigned

Bug Description

Steps:
1. Upload an image whose disk size is 816M and virtual size is 2.0G. As shown below:

qemu-img info 7e648d6d-55c0-44cf-82e1-80f08c2943c8

image: 7e648d6d-55c0-44cf-82e1-80f08c2943c8
file format: qcow2
virtual size: 2.0G (2147483648 bytes)
disk size: 816M
cluster_size: 65536
Format specific information:
    compat: 0.10

2. Start a server from the image mentioned with the default flavor m1.tiny(1C512M1G)

Expected Result:
...Flavor's disk is too small for requested image. Flavor disk is 1073741824 bytes, image is 2147483648 bytes.

Actual Result:
...Flavor's disk is too small for requested image. Flavor disk is 2147483648 bytes, image is 1073741824 bytes.

In fact, the flavor's disk size shown is the image size so their sizes may exchange with each other.

Environment:
>cat /etc/centos-release
CentOS Linux release 7.2.1511 (Core)
>uname -a
Linux localhost.localdomain 3.10.0-327.22.2.el7.x86_64 #1 SMP Thu Jun 23 17:05:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
>rpm -aq | grep nova-common
openstack-nova-common-12.0.4-1.el7.noarch(liberty)

ShuaiSun (sunshuai)
description: updated
summary: - Nova returns wrong message when flavor's disk is less than image size
+ Nova returns wrong message when flavor's disk is small than image size
summary: - Nova returns wrong message when flavor's disk is small than image size
+ Nova returns wrong message when flavor's disk is smaller than image size
summary: - Nova returns wrong message when flavor's disk is smaller than image size
+ Nova returns wrong message when flavor's disk is less than image size
Changed in nova:
assignee: nobody → viswesuwara nathan (viswesn)
Revision history for this message
viswesuwara nathan (viswesn) wrote :

For further debugging can you please share me the following information. Thanks

(openstack) flavor show m1.tiny

(openstack) image show <The Image ID>

You can get <The image ID> by running 'image list'.

Changed in nova:
status: New → In Progress
Revision history for this message
viswesuwara nathan (viswesn) wrote :
Download full text (4.2 KiB)

I could not see the similar issue in OpenStack liberty release tested on my environment using Devstack.

I used Ubuntu image of size 5.0 G of virtual size and disk size of 1.5 G; On trying to launch an instance
using 'nova boot' command stating flavor to be m1.tiny, System throws an error saying "m1.tiny flavor (1G) is too small for the requested image (Ubuntu)"

adminstrator@controller:~$
adminstrator@controller:~$ openstack

(openstack)
(openstack)
(openstack) image list
+--------------------------------------+---------------------------------+
| ID | Name |
+--------------------------------------+---------------------------------+
| 6a4c69f6-cf6c-4ac0-bbbf-01973ab6fc9b | Ubuntu |
| ab546da8-d30c-43c0-81be-97645f485c80 | cirros-0.3.4-x86_64-uec |
| 96a7df37-c62d-45d7-85fe-4668383384cd | cirros-0.3.4-x86_64-uec-ramdisk |
| 4aaf44a6-0019-4544-96d9-0bd97ca4fb3f | cirros-0.3.4-x86_64-uec-kernel |
+--------------------------------------+---------------------------------+

(openstack)
(openstack) image show 6a4c69f6-cf6c-4ac0-bbbf-01973ab6fc9b
+------------------+------------------------------------------------------+
| Field | Value |
+------------------+------------------------------------------------------+
| checksum | 49ade7433ecdb6c0b9813fec31b15165 |
| container_format | bare |
| created_at | 2016-08-24T10:08:05Z |
| disk_format | qcow2 |
| file | /v2/images/6a4c69f6-cf6c-4ac0-bbbf-01973ab6fc9b/file |
| id | 6a4c69f6-cf6c-4ac0-bbbf-01973ab6fc9b |
| min_disk | 0 |
| min_ram | 0 |
| name | Ubuntu |
| owner | c24c3b8893be46ce9e31d390d8d5509e |
| properties | description='Ubuntu' |
| protected | False |
| schema | /v2/schemas/image |
| size | 1646002176 |
| status | active |
| updated_at | 2016-08-24T10:09:56Z |
| virtual_size | None |
| visibility | public |
+------------------+------------------------------------------------------+
(openstack)

(openstack) flavor list
+----+-----------+-------+------+-----------+-------+-----------+
| ID | Name | RAM | Disk | Ephemeral | VCPUs | Is Public |
+----+-----------+-------+------+-----------+-------+-----------+
| 1 | m1.tiny | 512 | 1 | 0 | 1 | True |
| 11 | test | 128 | 1 | 0 | 3 | True |
|...

Read more...

Revision history for this message
Sean Dague (sdague) wrote :

There are no currently open reviews on this bug, changing
the status back to the previous state and unassigning. If
there are active reviews related to this bug, please include
links in comments.

Changed in nova:
status: In Progress → New
assignee: viswesuwara nathan (viswesn) → nobody
Revision history for this message
Sean Dague (sdague) wrote :

Automatically discovered version liberty in description. If this is incorrect, please update the description to include 'nova version: ...'

tags: added: openstack-version.liberty
Revision history for this message
Sean Dague (sdague) wrote :

I'm looking at the master code, and I don't see a place where this would go wrong. Can you confirm this is still an issue in master?

Changed in nova:
status: New → Incomplete
Revision history for this message
ShuaiSun (sunshuai) wrote :

I have confirmed that this is not an issue in master any more and this report is expired.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenStack Compute (nova) because there has been no activity for 60 days.]

Changed in nova:
status: Incomplete → Expired
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.