keystoneclient should only attempt to decode JSON in msg body if the response was a success
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
Fix Released
|
Low
|
Joseph Heck |
Bug Description
Since errors could be non-JSON encoded strings, the body in the JSON client should only attempt to be decoded on a 2xx success mode.
error from dashboard logging:
Recoverable error: n/a (HTTP 400)
Creating a new keystoneclient connection to http://
REQ: curl -i http://
RESP: {'status': '400', 'content-length': 36, 'content-type': 'text/plain'}
RESP BODY: Unable to find the server at haproxy
Could not decode JSON from body: Unable to find the server at haproxy
Request returned failure status.
Traceback (most recent call last):
File "/usr/lib/
body = json.loads(body)
File "/usr/lib/
return _default_
File "/usr/lib/
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Could not retrieve tenant list.
Traceback (most recent call last):
File "/usr/lib/
authd = api.tenant_
File "/usr/lib/
return c.tenants.list()
File "/usr/lib/
return self._list(
File "/usr/lib/
resp, body = self.api.get(url)
File "/usr/lib/
return self._cs_
File "/usr/lib/
**kwargs)
File "/usr/lib/
raise exceptions.
BadRequest: Unable to communicate with identity service: Unable to find the server at haproxy. (HTTP 400)
novaclient connection created using token "08e95a0d6bb445
REQ: curl -i http://
Changed in keystone: | |
status: | New → Triaged |
importance: | Undecided → Low |
Changed in keystone: | |
milestone: | none → folsom-2 |
status: | Fix Committed → Fix Released |
Changed in keystone: | |
milestone: | folsom-2 → 2012.2 |
Fix proposed to branch: master /review. openstack. org/8155
Review: https:/