← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1818310] [NEW] api-ref: block_device_mapping_v2.volume_size does not mention when it's required

 

Public bug reported:

As seen in this failed tempest test:

http://logs.openstack.org/50/332050/18/check/tempest-
full/f146d24/controller/logs/screen-n-api.txt.gz#_Mar_01_21_57_53_623712

Mar 01 21:57:53.536297 ubuntu-bionic-rax-dfw-0003242602 devstack@n-api.service[3071]: DEBUG nova.compute.api [None req-3ba6b743-aa11-468f-a524-dc19ceb16b4e tempest-DetachAttachBootVolumeShelveTestJSON-1339257189 tempest-DetachAttachBootVolumeShelveTestJSON-1339257189] [instance: ba7510aa-3f20-4849-a5e4-5f582a888d6e] block_device_mapping [BlockDeviceMapping(attachment_id=<?>,boot_index=0,connection_info=None,created_at=<?>,delete_on_termination=False,deleted=<?>,deleted_at=<?>,destination_type='volume',device_name=None,device_type=None,disk_bus=None,guest_format=None,id=<?>,image_id='83216c87-cd74-451f-b814-7a0baa0a51c7',instance=<?>,instance_uuid=<?>,no_device=False,snapshot_id=None,source_type='image',tag='root',updated_at=<?>,uuid=<?>,volume_id=None,volume_size=None,volume_type=None)] {{(pid=3072) _bdm_validate_set_size_and_instance /opt/stack/nova/nova/compute/api.py:1347}}
Mar 01 21:57:53.623712 ubuntu-bionic-rax-dfw-0003242602 devstack@n-api.service[3071]: INFO nova.api.openstack.wsgi [None req-3ba6b743-aa11-468f-a524-dc19ceb16b4e tempest-DetachAttachBootVolumeShelveTestJSON-1339257189 tempest-DetachAttachBootVolumeShelveTestJSON-1339257189] HTTP exception thrown: Images with destination_type 'volume' need to have a non-zero size specified

Trying to boot from volume with source_type='image' and
destination_type='volume' requires the volume_size to be specified:

https://github.com/openstack/nova/blob/5a09c81af3b438ecbcf27fa653095ff55abb3ed4/nova/compute/api.py#L1461

But that's not mentioned in the API reference which just says (for
volume_size):

"The size of the volume (in GiB). This is integer value from range 1 to
2147483647 which can be requested as integer and string."

** Affects: nova
     Importance: Low
         Status: Triaged


** Tags: api-ref low-hanging-fruit volumes

-- 
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/1818310

Title:
  api-ref: block_device_mapping_v2.volume_size does not mention when
  it's required

Status in OpenStack Compute (nova):
  Triaged

Bug description:
  As seen in this failed tempest test:

  http://logs.openstack.org/50/332050/18/check/tempest-
  full/f146d24/controller/logs/screen-n-api.txt.gz#_Mar_01_21_57_53_623712

  Mar 01 21:57:53.536297 ubuntu-bionic-rax-dfw-0003242602 devstack@n-api.service[3071]: DEBUG nova.compute.api [None req-3ba6b743-aa11-468f-a524-dc19ceb16b4e tempest-DetachAttachBootVolumeShelveTestJSON-1339257189 tempest-DetachAttachBootVolumeShelveTestJSON-1339257189] [instance: ba7510aa-3f20-4849-a5e4-5f582a888d6e] block_device_mapping [BlockDeviceMapping(attachment_id=<?>,boot_index=0,connection_info=None,created_at=<?>,delete_on_termination=False,deleted=<?>,deleted_at=<?>,destination_type='volume',device_name=None,device_type=None,disk_bus=None,guest_format=None,id=<?>,image_id='83216c87-cd74-451f-b814-7a0baa0a51c7',instance=<?>,instance_uuid=<?>,no_device=False,snapshot_id=None,source_type='image',tag='root',updated_at=<?>,uuid=<?>,volume_id=None,volume_size=None,volume_type=None)] {{(pid=3072) _bdm_validate_set_size_and_instance /opt/stack/nova/nova/compute/api.py:1347}}
  Mar 01 21:57:53.623712 ubuntu-bionic-rax-dfw-0003242602 devstack@n-api.service[3071]: INFO nova.api.openstack.wsgi [None req-3ba6b743-aa11-468f-a524-dc19ceb16b4e tempest-DetachAttachBootVolumeShelveTestJSON-1339257189 tempest-DetachAttachBootVolumeShelveTestJSON-1339257189] HTTP exception thrown: Images with destination_type 'volume' need to have a non-zero size specified

  Trying to boot from volume with source_type='image' and
  destination_type='volume' requires the volume_size to be specified:

  https://github.com/openstack/nova/blob/5a09c81af3b438ecbcf27fa653095ff55abb3ed4/nova/compute/api.py#L1461

  But that's not mentioned in the API reference which just says (for
  volume_size):

  "The size of the volume (in GiB). This is integer value from range 1
  to 2147483647 which can be requested as integer and string."

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


Follow ups