yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #74567
[Bug 1778929] Re: resource_provider API handler does not return specific error codes
** 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/1778929
Title:
resource_provider API handler does not return specific error codes
Status in OpenStack Compute (nova):
Fix Released
Bug description:
There are a few places in the resource_provider.py placement API
handler module that need to be updated to return custom error codes.
Custom error codes were added in the last few months or so. They allow
the caller to determine what exact issue occurred on the server to,
for example, cause a 409 Conflict to be returned.
In the resource_provider handler, look for places where we are raising
an HTTPConfict exception and add in a "comment" attribute for the
exception.
Here's an example of this being done in the allocation handler:
https://github.com/openstack/nova/blob/dbfba3951325524da184ddb681f71fd88e5ee81c/nova/api/openstack/placement/handlers/allocation.py#L335
For CannotDeleteParentProvider, you will want to create a new custom
error code in this file:
https://github.com/openstack/nova/blob/dbfba3951325524da184ddb681f71fd88e5ee81c/nova/api/openstack/placement/errors.py
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1778929/+subscriptions
References