← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1457517] Re: Unable to boot from volume when flavor disk too small

 

** Changed in: nova/kilo
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1457517

Title:
  Unable to boot from volume when flavor disk too small

Status in OpenStack Compute (nova):
  Fix Released
Status in OpenStack Compute (nova) kilo series:
  Fix Released
Status in nova package in Ubuntu:
  Fix Released
Status in nova source package in Vivid:
  Fix Committed

Bug description:
  [Impact]

   * Without the backport, booting from volume requires flavor disk size
  larger than volume size, which is wrong. This patch skips flavor disk
  size checking when booting from volume.

  [Test Case]

   * 1. create a bootable volume
     2. boot from this bootable volume with a flavor that has disk size smaller than the volume size
     3. error should be reported complaining disk size too small
     4. apply this patch
     5. boot from that bootable volume with a flavor that has disk size smaller than the volume size again
     6. boot should succeed

  [Regression Potential]

   * none

  
  Version: 1:2015.1.0-0ubuntu1~cloud0 on Ubuntu 14.04

  I attempt to boot an instance from a volume:

  nova boot --nic net-id=[NET ID] --flavor v.512mb --block-device
  source=volume,dest=volume,id=[VOLUME
  ID],bus=virtio,device=vda,bootindex=0,shutdown=preserve vm

  This results in nova-api raising a FlavorDiskTooSmall exception in the
  "_check_requested_image" function in compute/api.py. However,
  according to [1], the root disk limit should not apply to volumes.

  [1] http://docs.openstack.org/admin-guide-cloud/content/customize-
  flavors.html

  Log (first line is debug output I added showing that it's looking at
  the image that the volume was created from):

  2015-05-21 10:28:00.586 25835 INFO nova.compute.api [req-1fb882c7-07ae-4c2b-86bd-3d174602d0ae f438b80d215c42efb7508c59dc80940c 8341c85ad9ae49408fa25074adba0480 - - -] image: {'min_disk': 0, 'status': 'active', 'min_ram': 0, 'properties': {u'container_format': u'bare', u'min_ram': u'0', u'disk_format': u'qcow2', u'image_name': u'Ubuntu 14.04 64-bit', u'image_id': u'cf0dffef-30ef-4032-add0-516e88048d85', u'libvirt_cpu_mode': u'host-passthrough', u'checksum': u'76a965427d2866f006ddd2aac66ed5b9', u'min_disk': u'0', u'size': u'255524864'}, 'size': 21474836480}
  2015-05-21 10:28:00.587 25835 INFO nova.api.openstack.wsgi [req-1fb882c7-07ae-4c2b-86bd-3d174602d0ae f438b80d215c42efb7508c59dc80940c 8341c85ad9ae49408fa25074adba0480 - - -] HTTP exception thrown: Flavor's disk is too small for requested image.

  Temporary solution: I have special flavor for volume-backed instances so I just set the root disk on those to 0, but this doesn't work if volume are used on other flavors.
  Reproduce: create flavor with 1 GB root disk size, then try to boot an instance from a volume created from an image that is larger than 1 GB.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1457517/+subscriptions


References