← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1771325] [NEW] placement trait and inventory handler use nonstandard HTTP error message details

 

Public bug reported:

DELETE /traits/<standard trait name>

Actual
------

{"errors": [{"status": 400, "request_id": "req-b30e30ba-9fce-403f-
9f24-b6e32cd0b8c9", "detail": "Cannot delete standard trait
HW_GPU_API_DXVA.\n\n   ", "title": "Bad Request"}]}

Expected
--------

{"errors": [{"status": 400, "request_id": "req-3caa15be-a726-41f2-a7cb-
f4afb3c97a44", "detail": "The server could not comply with the request
since it is either malformed or otherwise incorrect.\n\n Cannot delete
standard trait HW_GPU_API_DXVA.  ", "title": "Bad Request"}]}

Most of the placement wsgi code passes one positional argument to the
constructor of the  webob.exc.HTTPXXX exception classes but the trait
[1] and inventory handlers uses the 'explanation' kwargs. As the above
example shows this leads to different behavior. This inconsistency leads
to incorrect behavior in osc placement client [2].

[1] https://github.com/openstack/nova/blob/ae131868f71700d69053b65a0a37f9c2d65c3770/nova/api/openstack/placement/handlers/trait.py#L133
[2] https://github.com/openstack/osc-placement/blob/2357807c95d74afc836852e1c54f0631c6fd2d60/osc_placement/http.py#L35

** Affects: nova
     Importance: Undecided
     Assignee: Balazs Gibizer (balazs-gibizer)
         Status: New


** Tags: placement

** Tags added: placement

** Changed in: nova
     Assignee: (unassigned) => Balazs Gibizer (balazs-gibizer)

-- 
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/1771325

Title:
  placement trait and inventory handler use nonstandard HTTP error
  message details

Status in OpenStack Compute (nova):
  New

Bug description:
  DELETE /traits/<standard trait name>

  Actual
  ------

  {"errors": [{"status": 400, "request_id": "req-b30e30ba-9fce-403f-
  9f24-b6e32cd0b8c9", "detail": "Cannot delete standard trait
  HW_GPU_API_DXVA.\n\n   ", "title": "Bad Request"}]}

  Expected
  --------

  {"errors": [{"status": 400, "request_id": "req-3caa15be-a726-41f2
  -a7cb-f4afb3c97a44", "detail": "The server could not comply with the
  request since it is either malformed or otherwise incorrect.\n\n
  Cannot delete standard trait HW_GPU_API_DXVA.  ", "title": "Bad
  Request"}]}

  Most of the placement wsgi code passes one positional argument to the
  constructor of the  webob.exc.HTTPXXX exception classes but the trait
  [1] and inventory handlers uses the 'explanation' kwargs. As the above
  example shows this leads to different behavior. This inconsistency
  leads to incorrect behavior in osc placement client [2].

  [1] https://github.com/openstack/nova/blob/ae131868f71700d69053b65a0a37f9c2d65c3770/nova/api/openstack/placement/handlers/trait.py#L133
  [2] https://github.com/openstack/osc-placement/blob/2357807c95d74afc836852e1c54f0631c6fd2d60/osc_placement/http.py#L35

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1771325/+subscriptions


Follow ups