Bug 1205806 - QCOW2 virtual size can bypass disk size checks for a flavor
Summary: QCOW2 virtual size can bypass disk size checks for a flavor
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova
Version: 5.0 (RHEL 6)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: z4
: 5.0 (RHEL 6)
Assignee: Pádraig Brady
QA Contact: Prasanth Anbalagan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-25 16:19 UTC by Pádraig Brady
Modified: 2023-02-22 23:02 UTC (History)
13 users (show)

Fixed In Version: openstack-nova-2014.1.4-2.el6ost openstack-nova-2014.1.4-2.el7ost
Doc Type: Bug Fix
Doc Text:
Previously, the Compute service used incorrect size checks against the QCOW2 virtual size, which meant that the root-disk size for a flavor was not honored. With this fix, size checks have been reinstated, and instances are again restricted to the root-disk size of a flavor.
Clone Of:
: 1205808 (view as bug list)
Environment:
Last Closed: 2015-04-16 14:36:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 167658 0 None None None Never
Red Hat Issue Tracker OSP-16594 0 None None None 2022-07-09 07:22:48 UTC
Red Hat Product Errata RHSA-2015:0843 0 normal SHIPPED_LIVE Important: openstack-nova security, bug fix, and enhancement update 2015-04-16 18:27:45 UTC

Description Pádraig Brady 2015-03-25 16:19:11 UTC
Introduced with the changes for bug 1062022 (RHOS 5 A3)

Comment 3 Prasanth Anbalagan 2015-04-07 13:33:28 UTC
Verified on the following version, Booting an instance from a QCOW2 image,
which has virtual_size bigger than one allowed by the given flavor
throws error message.

Version
========

[root@rhos-compute-node-02 ~(keystone_admin)]# yum list installed | grep openstack-nova
openstack-nova-api.noarch        2014.1.4-3.el6ost       @rhelosp-5.0-el6-puddle
openstack-nova-cert.noarch       2014.1.4-3.el6ost       @rhelosp-5.0-el6-puddle
openstack-nova-common.noarch     2014.1.4-3.el6ost       @rhelosp-5.0-el6-puddle
openstack-nova-compute.noarch    2014.1.4-3.el6ost       @rhelosp-5.0-el6-puddle
openstack-nova-conductor.noarch  2014.1.4-3.el6ost       @rhelosp-5.0-el6-puddle
openstack-nova-console.noarch    2014.1.4-3.el6ost       @rhelosp-5.0-el6-puddle
openstack-nova-novncproxy.noarch 2014.1.4-3.el6ost       @rhelosp-5.0-el6-puddle
openstack-nova-scheduler.noarch  2014.1.4-3.el6ost       @rhelosp-5.0-el6-puddle

Logs
=====

[root@rhos-compute-node-02 ~(keystone_admin)]# glance  image-create --name centos6 --disk-format qcow2 --container-format bare --file CentOS-6-x86_64-GenericCloud-20141129_01.qcow2 --is-public True
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | 62ac2565e3527377860361f57639f334     |
| container_format | bare                                 |
| created_at       | 2015-04-07T13:15:53                  |
| deleted          | False                                |
| deleted_at       | None                                 |
| disk_format      | qcow2                                |
| id               | f7a89493-b343-4dbf-922f-87bbc6016611 |
| is_public        | True                                 |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | centos6                              |
| owner            | 18c43b5677e14fa28d02ae6d23a0b527     |
| protected        | False                                |
| size             | 1151533056                           |
| status           | active                               |
| updated_at       | 2015-04-07T13:16:00                  |
| virtual_size     | None                                 |
+------------------+--------------------------------------+
[root@rhos-compute-node-02 ~(keystone_admin)]# glance image-list
+--------------------------------------+---------+-------------+------------------+------------+--------+
| ID                                   | Name    | Disk Format | Container Format | Size       | Status |
+--------------------------------------+---------+-------------+------------------+------------+--------+
| f7a89493-b343-4dbf-922f-87bbc6016611 | centos6 | qcow2       | bare             | 1151533056 | active |
| 976a4fc6-02eb-4ac7-abaf-4e69da8be222 | cirros  | qcow2       | bare             | 13147648   | active |
+--------------------------------------+---------+-------------+------------------+------------+--------+
[root@rhos-compute-node-02 ~(keystone_admin)]# nova image-list
+--------------------------------------+---------+--------+--------+
| ID                                   | Name    | Status | Server |
+--------------------------------------+---------+--------+--------+
| f7a89493-b343-4dbf-922f-87bbc6016611 | centos6 | ACTIVE |        |
| 976a4fc6-02eb-4ac7-abaf-4e69da8be222 | cirros  | ACTIVE |        |
+--------------------------------------+---------+--------+--------+
[root@rhos-compute-node-02 ~(keystone_admin)]# nova flavor-list
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name      | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 1  | m1.tiny   | 512       | 1    | 0         |      | 1     | 1.0         | True      |
| 2  | m1.small  | 2048      | 20   | 0         |      | 1     | 1.0         | True      |
| 3  | m1.medium | 4096      | 40   | 0         |      | 2     | 1.0         | True      |
| 4  | m1.large  | 8192      | 80   | 0         |      | 4     | 1.0         | True      |
| 5  | m1.xlarge | 16384     | 160  | 0         |      | 8     | 1.0         | True      |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
[root@rhos-compute-node-02 ~(keystone_admin)]# nova boot --flavor 1 --image f7a89493-b343-4dbf-922f-87bbc6016611 test_1205806
ERROR: Flavor's disk is too small for requested image. (HTTP 400) (Request-ID: req-507f25c5-253b-4523-a6a4-17ceb376b03c)

Comment 5 errata-xmlrpc 2015-04-16 14:36:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0843.html


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