yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #66330
[Bug 1708037] [NEW] scheduler/resource tracker report client should send accept header on all requests
Public bug reported:
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.
** Affects: nova
Importance: Low
Status: Confirmed
** Tags: placement
--
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):
Confirmed
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
Follow ups