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

Bug #1818310 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Takashi Natsume

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 <email address hidden>[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 <email address hidden>[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."

Changed in nova:
assignee: nobody → Takashi NATSUME (natsume-takashi)
Changed in nova:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/641255

Changed in nova:
assignee: Takashi NATSUME (natsume-takashi) → Matt Riedemann (mriedem)
Matt Riedemann (mriedem)
Changed in nova:
assignee: Matt Riedemann (mriedem) → Takashi NATSUME (natsume-takashi)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/641255
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=f87bf4c6b9b9916bdb6963024e50e3346b7c34ea
Submitter: Zuul
Branch: master

commit f87bf4c6b9b9916bdb6963024e50e3346b7c34ea
Author: Takashi NATSUME <email address hidden>
Date: Wed Mar 6 15:54:23 2019 +0900

    api-ref: Add description for BDM volume_size

    Add description of cases that 'block_device_mapping_v2.volume_size`
    is required in the "Create Server" (POST /servers) API.

    Change-Id: I36f28ca756b908b5fc591cc87f5786a3e217285e
    Closes-Bug: #1818310

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 19.0.0.0rc1

This issue was fixed in the openstack/nova 19.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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