multiattach volume failures are masked in compute api

Bug #1750064 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
Fix Committed
Medium
melanie witt

Bug Description

While trying to create a server from a multiattach volume, I kept getting this unhelpful error:

$ openstack server create --flavor 1 --wait --volume cirros-multiattach-volume new-server
Block Device Mapping is Invalid: failed to get volume fde36bc8-3104-43b7-902a-3b391d7f4e12. (HTTP 400) (Request-ID: req-4e2dc785-82b6-4e48-93e5-9b72bd62b3ba)

By adding some debug code to nova-api, I figured out it was this:

Feb 16 21:18:35 multiattach <email address hidden>[13811]: ERROR nova.compute.api [None req-88476e2e-f6ed-4b95-bed2-f6cf567b044d demo demo] Failed to get volume fde36bc8-3104-43b7-902a-3b391d7f4e12. Error: Multiattach volumes are only supported starting with compute API version 2.60.: MultiattachNotSupportedOldMicroversion: Multiattach volumes are only supported starting with compute API version 2.60.

This is the problematic exception block:

https://github.com/openstack/nova/blob/9910ac95eb9ac822ef5d38b8af2d3aff5dc4d25a/nova/compute/api.py#L1354

Matt Riedemann (mriedem)
Changed in nova:
status: New → Triaged
importance: Undecided → Medium
Matt Riedemann (mriedem)
Changed in nova:
assignee: nobody → Matt Riedemann (mriedem)
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/545478

Changed in nova:
status: Triaged → In Progress
melanie witt (melwitt)
tags: added: queens-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/546729

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

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

commit 5754ac0ab3670b47243b2d880aa153a7f42a3ac5
Author: Matt Riedemann <email address hidden>
Date: Fri Feb 16 17:38:38 2018 -0500

    Fix error handling in compute API for multiattach errors

    Because of the big Exception block in _validate_bdm, the
    multiattach-specific errors raised out of the
    _check_attach_and_reserve_volume method were being lost
    and the very generic InvalidBDMVolume was returned to the
    user.

    For example, I hit this when trying to create a server from
    a multiattach volume but forgot to specify microversion 2.60
    and it was just telling me it couldn't get the volume, which
    I knew was bogus since I could get the volume details.

    The fix is to handle the specific errors we want to re-raise.

    The tests, which missed this because of their high-level mocking,
    are updated so that we actually get to the problematic code and
    only the things we don't care about along the way are mocked out.

    Change-Id: I0b397e5bcdfd635fa562beb29819dd8c6b828e8a
    Closes-Bug: #1750064

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

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

commit 6fcd03d3dbd738024dd8f4c4a34eb7495363e47a
Author: Matt Riedemann <email address hidden>
Date: Fri Feb 16 17:38:38 2018 -0500

    Fix error handling in compute API for multiattach errors

    Because of the big Exception block in _validate_bdm, the
    multiattach-specific errors raised out of the
    _check_attach_and_reserve_volume method were being lost
    and the very generic InvalidBDMVolume was returned to the
    user.

    For example, I hit this when trying to create a server from
    a multiattach volume but forgot to specify microversion 2.60
    and it was just telling me it couldn't get the volume, which
    I knew was bogus since I could get the volume details.

    The fix is to handle the specific errors we want to re-raise.

    The tests, which missed this because of their high-level mocking,
    are updated so that we actually get to the problematic code and
    only the things we don't care about along the way are mocked out.

    Change-Id: I0b397e5bcdfd635fa562beb29819dd8c6b828e8a
    Closes-Bug: #1750064
    (cherry picked from commit 5754ac0ab3670b47243b2d880aa153a7f42a3ac5)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 17.0.0.0rc3

This issue was fixed in the openstack/nova 17.0.0.0rc3 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 18.0.0.0b1

This issue was fixed in the openstack/nova 18.0.0.0b1 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.