Booting from volume nolonger can be bigger that flavor size

Bug #1517671 reported by Roman Rufanov
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Released
High
MOS Nova
6.1.x
Fix Released
High
Sergii Rizvan
7.0.x
Fix Released
High
Sergii Rizvan
8.0.x
Fix Released
High
MOS Nova

Bug Description

Customer found in 7.0 - backport of https://bugs.launchpad.net/nova/+bug/1466305 into 7.0 is needed.
Proposed solution is https://review.openstack.org/#/c/204635/ which closes this other 2 bugs.

Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/nova (openstack-ci/fuel-7.0/2015.1.0)

Fix proposed to branch: openstack-ci/fuel-7.0/2015.1.0
Change author: Matthew Booth <email address hidden>
Review: https://review.fuel-infra.org/14031

Revision history for this message
Roman Rufanov (rrufanov) wrote :

customer found on MOS 7.0 - please fix

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/nova (openstack-ci/fuel-7.0/2015.1.0)

Reviewed: https://review.fuel-infra.org/14031
Submitter: Denis V. Meltsaykin <email address hidden>
Branch: openstack-ci/fuel-7.0/2015.1.0

Commit: a9947ca3cdeba35f808585eee026e34ae91b39de
Author: Matthew Booth <email address hidden>
Date: Fri Nov 20 08:57:10 2015

Don't check flavor disk size when booting from volume

When creating a volume from an image, cinder copies the image metadata
into volume properties. When booting from the volume, we read this
metadata from the volume and use it as image metadata once again.

While fixing the check against min_ram,
change I861a78b5c7efa71e4bf7206d388b8d0d8048c78e introduced a
regression which prevents a user from booting a volume which is larger
than the flavor's disk. As we are not creating this disk, this check
does not make sense. Similarly, it checks the image metadata's
min_disk against the flavor disk size, which is not being used.

This change leaves the image metadata check unaltered when creating a
flavor disk. When booting from a volume, we check min_disk from image
metadata against the actual size of the volume. We don't check the
volume size at all. The check against min_ram is retained unaltered.

Closes-Bug: #1517671
Change-Id: I264493172da20b664df571e32876030246c2a87c
(cherry-picked from upstream commit 642c986f0636d52a9ba279c87e25082b4aa9b3b8)

Sergii Rizvan (srizvan)
tags: added: on-verification
Sergii Rizvan (srizvan)
tags: removed: on-verification
Revision history for this message
Sergii Rizvan (srizvan) wrote :

Verified on 7.0 on Ubuntu:
Packages:
nova-api 1:2015.1.1-1~u14.04+mos19665
nova-cert 1:2015.1.1-1~u14.04+mos19665
nova-common 1:2015.1.1-1~u14.04+mos19665
nova-conductor 1:2015.1.1-1~u14.04+mos19665
nova-consoleauth 1:2015.1.1-1~u14.04+mos19665
nova-consoleproxy 1:2015.1.1-1~u14.04+mos19665
nova-objectstore 1:2015.1.1-1~u14.04+mos19665
nova-scheduler 1:2015.1.1-1~u14.04+mos19665
python-nova 1:2015.1.1-1~u14.04+mos19665

Revision history for this message
Alexander Gubanov (ogubanov) wrote :

Verified on MOS 8.0 (build 410) - works fine!
Details here http://pastebin.com/EPHvLV3k

tags: added: 7.0-mu-2
Revision history for this message
Alexander Rubtsov (arubtsov) wrote :

A customer who use MOS 6.1 is also affected by the bug
Is it possible to port the fix to 6.1 release?

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/nova (openstack-ci/fuel-6.1/2014.2)

Fix proposed to branch: openstack-ci/fuel-6.1/2014.2
Change author: Matthew Booth <email address hidden>
Review: https://review.fuel-infra.org/16817

Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :

Release notes:

Nova no longer fails to boot instance from a volume with FlavorDiskTooSmall exception, if the volume size or min_disk attribute (came from an original image at create volume operation) are greater than root_gb attribute of a requested flavor.

tags: added: release-notes
tags: added: 8.0 release-notes-done
removed: release-notes
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/nova (openstack-ci/fuel-6.1/2014.2)

Reviewed: https://review.fuel-infra.org/16817
Submitter: Vitaly Sedelnik <email address hidden>
Branch: openstack-ci/fuel-6.1/2014.2

Commit: 666884613b37e8d5449c018812a833750c3a99da
Author: Matthew Booth <email address hidden>
Date: Mon Feb 29 16:21:13 2016

Don't check flavor disk size when booting from volume

When creating a volume from an image, cinder copies the image metadata
into volume properties. When booting from the volume, we read this
metadata from the volume and use it as image metadata once again.

While fixing the check against min_ram,
change I861a78b5c7efa71e4bf7206d388b8d0d8048c78e introduced a
regression which prevents a user from booting a volume which is larger
than the flavor's disk. As we are not creating this disk, this check
does not make sense. Similarly, it checks the image metadata's
min_disk against the flavor disk size, which is not being used.

This change leaves the image metadata check unaltered when creating a
flavor disk. When booting from a volume, we check min_disk from image
metadata against the actual size of the volume. We don't check the
volume size at all. The check against min_ram is retained unaltered.

Closes-Bug: #1517671
Change-Id: I264493172da20b664df571e32876030246c2a87c
(cherry-picked from commit a9947ca3cdeba35f808585eee026e34ae91b39de)

tags: added: on-verification
Revision history for this message
Ekaterina Shutova (eshutova) wrote :

Verified on 6.1-mu-5.

Before updates:
[root@node-1 ~]# nova boot --nic net-id=3e3e6ab4-4793-400a-9507-79161e806223 --flavor 1 --block-device source=volume,dest=volume,id=9f341533-b9dc-4836-a6b9-a30c058aa680,bus=virtio,device=vda,bootindex=0,shutdown=preserve vm
ERROR (BadRequest): Flavor's disk is too small for requested image. (HTTP 400) (Request-ID: req-576eb30b-a10a-4abc-8606-6b3ae7862f1e)

After updates:
root@node-7:~# nova list
+--------------------------------------+------+--------+------------+-------------+------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------+--------+------------+-------------+------------------------+
| 3a5b1b21-1895-4f89-b37a-3307cd7f7aa6 | vm | ACTIVE | - | Running | net04_ext=10.109.6.131 |
+--------------------------------------+------+--------+------------+-------------+------------------------+

tags: removed: on-verification
tags: added: on-automation
Revision history for this message
Ekaterina Shutova (eshutova) wrote :
tags: removed: on-automation
tags: added: covered-automated-test
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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