Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1205806 - QCOW2 virtual size can bypass disk size checks for a flavor
QCOW2 virtual size can bypass disk size checks for a flavor
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova (Show other bugs)
5.0 (RHEL 6)
Unspecified Unspecified
high Severity high
: z4
: 5.0 (RHEL 6)
Assigned To: Pádraig Brady
Prasanth Anbalagan
: Triaged, ZStream
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-03-25 12:19 EDT by Pádraig Brady
Modified: 2016-01-04 09:43 EST (History)
15 users (show)

See Also:
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.
Story Points: ---
Clone Of:
: 1205808 (view as bug list)
Environment:
Last Closed: 2015-04-16 10:36:27 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
OpenStack gerrit 167658 None None None Never
Red Hat Product Errata RHSA-2015:0843 normal SHIPPED_LIVE Important: openstack-nova security, bug fix, and enhancement update 2015-04-16 14:27:45 EDT

  None (edit)
Description Pádraig Brady 2015-03-25 12:19:11 EDT
Introduced with the changes for bug 1062022 (RHOS 5 A3)
Comment 3 Prasanth Anbalagan 2015-04-07 09:33:28 EDT
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 10:36:27 EDT
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.