← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1224469] Re: if volume size is None for image bdms nova compute throws an exception

 

** Changed in: nova
       Status: Fix Committed => 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/1224469

Title:
  if volume size is None for image bdms nova compute throws an exception

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  When attempting to boot an instance with a block device with
  source=image,dest=volume and there is no volume size specified - nova
  compute will error out:

  [ndipanov@localhost devstack]$ nova boot --flavor 1 --block-device
  bootindex=0,source=image,dest=volume,id=42ccba7f-914b-
  4e3d-8387-b7b30d96a7a5,type=cdrom,bus=ide testimgvol

  in nova compute logs:

  ERROR nova.compute.manager [req-a7200578-8bf4-4791-a5bf-449c473d41b6 demo demo] [instance: 8edd2e9e-4b4d-44ac-92f1-bea38cd5320d] Error: Invalid input received: Invalid input received: Volume size None must be an integer and greater than 0
  2013-09-12 09:20:15.362 TRACE nova.compute.manager [instance: 8edd2e9e-4b4d-44ac-92f1-bea38cd5320d] Traceback (most recent call last):
  2013-09-12 09:20:15.362 TRACE nova.compute.manager [instance: 8edd2e9e-4b4d-44ac-92f1-bea38cd5320d]   File "/opt/stack/nova/nova/compute/manager.py", line 1038, in _build_instance
  2013-09-12 09:20:15.362 TRACE nova.compute.manager [instance: 8edd2e9e-4b4d-44ac-92f1-bea38cd5320d]     context, instance, bdms)
  2013-09-12 09:20:15.362 TRACE nova.compute.manager [instance: 8edd2e9e-4b4d-44ac-92f1-bea38cd5320d]   File "/opt/stack/nova/nova/compute/manager.py", line 1403, in _prep_block_device
  2013-09-12 09:20:15.362 TRACE nova.compute.manager [instance: 8edd2e9e-4b4d-44ac-92f1-bea38cd5320d]     instance=instance)
  2013-09-12 09:20:15.362 TRACE nova.compute.manager [instance: 8edd2e9e-4b4d-44ac-92f1-bea38cd5320d]   File "/opt/stack/nova/nova/compute/manager.py", line 1386, in _prep_block_device
  2013-09-12 09:20:15.362 TRACE nova.compute.manager [instance: 8edd2e9e-4b4d-44ac-92f1-bea38cd5320d]     self._await_block_device_map_created))
  2013-09-12 09:20:15.362 TRACE nova.compute.manager [instance: 8edd2e9e-4b4d-44ac-92f1-bea38cd5320d]   File "/opt/stack/nova/nova/virt/block_device.py", line 283, in attach_block_devices
  2013-09-12 09:20:15.362 TRACE nova.compute.manager [instance: 8edd2e9e-4b4d-44ac-92f1-bea38cd5320d]     block_device_mapping)
  2013-09-12 09:20:15.362 TRACE nova.compute.manager [instance: 8edd2e9e-4b4d-44ac-92f1-bea38cd5320d]   File "/opt/stack/nova/nova/virt/block_device.py", line 236, in attach
  2013-09-12 09:20:15.362 TRACE nova.compute.manager [instance: 8edd2e9e-4b4d-44ac-92f1-bea38cd5320d]     '', '', image_id=self.image_id)
  2013-09-12 09:20:15.362 TRACE nova.compute.manager [instance: 8edd2e9e-4b4d-44ac-92f1-bea38cd5320d]   File "/opt/stack/nova/nova/volume/cinder.py", line 309, in create
  2013-09-12 09:20:15.362 TRACE nova.compute.manager [instance: 8edd2e9e-4b4d-44ac-92f1-bea38cd5320d]     raise exception.InvalidInput(reason=e.message)
  2013-09-12 09:20:15.362 TRACE nova.compute.manager [instance: 8edd2e9e-4b4d-44ac-92f1-bea38cd5320d] InvalidInput: Invalid input received: Invalid input received: Volume size None must be an integer and greater than 0
  2013-09-12 09:20:15.362 TRACE nova.compute.manager [instance: 8edd2e9e-4b4d-44ac-92f1-bea38cd5320d] 

  We should disallow empty or default the volume size if not specified.

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