API exceptions are not logged
Bug #1229292 reported by
Steven Hardy
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Heat |
Fix Released
|
High
|
Zane Bitter |
Bug Description
It appears that all API errors now fail to log anything. This seems to affect the CFN and native ReST API's.
The native API is using the faultwrap middleware, which doesn't log anything, so we can add logging there, but I'm not sure where we need to add it for the CFN API as the default paste pipeline doesn't use faultwrap.
This can be reproduced by putting a raise Exception() somewhere in the API code, nothing is logged, although with debugging enabled the ReST API returns a JSON-formatted traceback via the API.
Changed in heat: | |
status: | New → Triaged |
importance: | Undecided → High |
milestone: | none → havana-rc1 |
assignee: | nobody → Steven Hardy (shardy) |
Changed in heat: | |
assignee: | Steven Hardy (shardy) → nobody |
Changed in heat: | |
assignee: | nobody → Steven Hardy (shardy) |
Changed in heat: | |
assignee: | Steven Hardy (shardy) → Zane Bitter (zaneb) |
Changed in heat: | |
status: | Fix Committed → Fix Released |
Changed in heat: | |
milestone: | havana-rc1 → 2013.2 |
To post a comment you must log in.
Hmm, this is actually not that simple:
in the api/middleware/ fault.py code we have this:
if ex_type. endswith( rpc_common. _REMOTE_ POSTFIX) : :-len(rpc_ common. _REMOTE_ POSTFIX) ]
remote_ error = True
ex_type = ex_type[
However, if for example you do raise Exception("foo") in the engine, the ex_type is just "Exception":
SHDEBUG ex_type = Exception _REMOTE_ POSTFIX = _Remote
SHDEBUG rpc_common.
So it would appear we've got no way to detect if this is a local or remote error, hence whether we should log the trace for the local error or not. Sigh.