api-ref: block_device_mapping_v2.boot_index is required until queens

Bug #1766306 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Matt Riedemann
Queens
In Progress
Medium
Matt Riedemann

Bug Description

Change https://review.openstack.org/#/c/550648/ marked the block_device_mapping_v2.boot_index parameter for POST /servers as optional, but it's only optional since this change in Queens:

https://review.openstack.org/#/c/524208/

Before that, you'll get an error like this if you boot from volume but don't specify a boot_index for each BDM in the list:

2018-04-23 12:34:13,308 INFO [nova.api.openstack.wsgi] HTTP exception thrown: Block Device Mapping is Invalid: Boot sequence for the instance and image/block device mapping combination is not valid.
    2018-04-23 12:34:13,310 INFO [nova.api.openstack.requestlog] 127.0.0.1 "POST /v2.1/6f70656e737461636b20342065766572/servers" status: 400 len: 164 microversion: 2.1 time: 0.129485

Therefore we should probably mark the parameter as required since the API reference applies to older versions/releases of the API too.

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

Changed in nova:
assignee: nobody → Matt Riedemann (mriedem)
status: Triaged → In Progress
Revision history for this message
Matt Riedemann (mriedem) wrote :

I noticed this when working on a backport for stable/pike where my functional test wasn't specifying boot_index=0:

https://review.openstack.org/#/c/563700/1//COMMIT_MSG@41

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/563732

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit 048fa2310014e6282e183da0abee87c73b6d71b9
Author: Matt Riedemann <email address hidden>
Date: Mon Apr 23 14:01:36 2018 -0400

    api-ref: mark block_device_mapping_v2.boot_index as required

    This was marked optional in change If57aa3e37 but it has
    only been optional since Queens due to change I8a3e7e6c4,
    before that you will get a 400 error if you do not provide
    boot_index in the BDMs, e.g.:

    2018-04-23 12:34:13,308 INFO [nova.api.openstack.wsgi] \
       HTTP exception thrown: Block Device Mapping is Invalid: \
       Boot sequence for the instance and image/block device \
       mapping combination is not valid.
    2018-04-23 12:34:13,310 INFO [nova.api.openstack.requestlog] \
       127.0.0.1 "POST /v2.1/6f70656e737461636b20342065766572/servers"
       status: 400 len: 164 microversion: 2.1 time: 0.129485

    One could argue that I8a3e7e6c4b72eb1c3707d54049d18dc29f606fe5
    is a behavior change that should have gone with a microversion,
    which if people agree with that, could be reverted separately.

    Change-Id: I14d44dbc0b6a8fb25932c333e695cad9edaefbed
    Closes-Bug: #1766306

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (master)

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

commit b9815c2331904a3749269289b861229796aa6c91
Author: Matt Riedemann <email address hidden>
Date: Mon Apr 23 14:33:25 2018 -0400

    Fix dropped check for boot_index 0 in _validate_bdm

    This reverts commit 7f4b49c9c97e06babf82f6846c804ad176cd4cde.

    During refactor change I8a3e7e6c4b72eb1c3707d54049d18dc29f606fe5
    the conditional that at least one BDM had to be the boot
    device was inadvertantly dropped, presumably because there was
    no test for that case.

    The validation is added back here along with a test.

    Change-Id: I299bf846b658f2bb6903c898d7deac748f8d90e4
    Related-Bug: #1766306

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to nova (stable/queens)

Related fix proposed to branch: stable/queens
Review: https://review.openstack.org/564461

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (stable/queens)

Reviewed: https://review.openstack.org/564461
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=dcb51804127a40768f543fa30b6b505695bf64d1
Submitter: Zuul
Branch: stable/queens

commit dcb51804127a40768f543fa30b6b505695bf64d1
Author: Matt Riedemann <email address hidden>
Date: Mon Apr 23 14:33:25 2018 -0400

    Fix dropped check for boot_index 0 in _validate_bdm

    This reverts commit 7f4b49c9c97e06babf82f6846c804ad176cd4cde.

    During refactor change I8a3e7e6c4b72eb1c3707d54049d18dc29f606fe5
    the conditional that at least one BDM had to be the boot
    device was inadvertantly dropped, presumably because there was
    no test for that case.

    The validation is added back here along with a test.

    Change-Id: I299bf846b658f2bb6903c898d7deac748f8d90e4
    Related-Bug: #1766306
    (cherry picked from commit b9815c2331904a3749269289b861229796aa6c91)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 18.0.0.0b2

This issue was fixed in the openstack/nova 18.0.0.0b2 development milestone.

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.