yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #71316
[Bug 1750064] Re: multiattach volume failures are masked in compute api
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 <mriedem.os@xxxxxxxxx>
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
--
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/1750064
Title:
multiattach volume failures are masked in compute api
Status in OpenStack Compute (nova):
Fix Released
Status in OpenStack Compute (nova) queens series:
In Progress
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 devstack@n-api.service[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
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1750064/+subscriptions
References