Reviewed: https://review.openstack.org/489772 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=5905eb7f48a86dcac5a810d318f1d4dae9138286 Submitter: Jenkins Branch: master
commit 5905eb7f48a86dcac5a810d318f1d4dae9138286 Author: Chris Dent <cd...@anticdent.org> Date: Tue Aug 1 23:35:56 2017 +0100 Always use application/json accept header in report client Always send 'accept: application/json' header when the scheduler report client talks to placement. Setting accept ensures that if there are error responses, they will be formatted as JSON, not HTML. Without the accept header, webob will choose to send what it thinks is a reasonable default. Change-Id: I7464e085c8c688d85cdce5aaddcf3bf2e04498ab Closes-Bug: #1708037 ** 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/1708037 Title: scheduler/resource tracker report client should send accept header on all requests Status in OpenStack Compute (nova): Fix Released Bug description: Currently the report client doesn't consisently use an accept header of 'application/json' when making requests of the placement API. This means that sometimes the bodies of the error responses are in HTML which means processing and inspection of the error response is unpredictable and unstructured. If/when placement starts including error codes in responses (as described in http://specs.openstack.org/openstack/api-wg/guidelines/errors.html ) this will be a problem. This misfeature is an artifact of WebOb which defaults to constructing a response body based on what it perceives to be the client's desired response media type. It falls back to the text/html. Strictly speaking it is the correct behavior. Because of the way placement is designed, it is safe to always send both content-type and accept headers of 'application/json' so we could make this most correct by changing the report client to always have the headers. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1708037/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp