resource_provider API handler does not return specific error codes

Bug #1778929 reported by Jay Pipes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Deepak Mourya

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

Changed in nova:
assignee: nobody → Deepak Mourya (mourya007)
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/579423

Changed in nova:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 18.0.0.0b3

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

Changed in nova:
status: In Progress → Fix Released
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.