yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #68092
[Bug 1714402] Re: When setting an allocation with multiple resource providers and one of them does not exist the error message can be wrong
Reviewed: https://review.openstack.org/502205
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=ad2c7a3c80edc78945b295c2dafe5681004a66fd
Submitter: Jenkins
Branch: master
commit ad2c7a3c80edc78945b295c2dafe5681004a66fd
Author: Chris Dent <cdent@xxxxxxxxxxxxx>
Date: Sat Sep 9 02:47:30 2017 +0100
[placement] correct error on bad resource class in allocation
A 400 is returned when making an allocation with a resource class that
does not exist, however the error message refers to whatever the most
recent resource provider uuid was rather than the one that was given
the bad resource class. Since the exception happens outside the loop
that creates the allocations we don't have the association to resource
provider uuid, but we do know which consumer uuid, so report that
instead.
Change-Id: I81dc6b566c6cca0b7d2ac267c3e632c8ae8cfb47
Closes-Bug: #1714402
** 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/1714402
Title:
When setting an allocation with multiple resource providers and one of
them does not exist the error message can be wrong
Status in OpenStack Compute (nova):
Fix Released
Bug description:
nova master as of 20170831
The _set_allocations method used to write allocations to the placement
API will raise a 400 when a resource class results in a NotFound
exception. We want that 400. The problem is that the message
associated with the error users the resource provider uuid from
whatever resource provider was the last one in a loop, not the one
that creates the error. See:
https://github.com/openstack/nova/blob/master/nova/api/openstack/placement/handlers/allocation.py#L231-L234
and the loop prior.
This is not a huge deal because it's unlikely that people are
inspecting error responses all that much, but it would be nice to fix.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1714402/+subscriptions
References