Merge "Conductor will properly log exceptions even if they are passed to failure blocks"
This commit is contained in:
commit
23d31564db
@ -42,11 +42,13 @@ def update_cf_stack(engine, context, body, template, result=None, error=None,
|
||||
}
|
||||
failure_handler = body.find('failure')
|
||||
if failure_handler is not None:
|
||||
log.warning("Handling exception in failure block")
|
||||
log.warning("Handling exception in failure block",
|
||||
exc_info=True)
|
||||
engine.evaluate_content(failure_handler, context)
|
||||
return
|
||||
else:
|
||||
log.error("No failure block found for exception")
|
||||
log.error("No failure block found for exception",
|
||||
exc_info=True)
|
||||
raise error_result
|
||||
|
||||
success_handler = body.find('success')
|
||||
|
@ -72,9 +72,12 @@ def send_command(engine, context, body, template, service, unit, mappings=None,
|
||||
context[error] = errors
|
||||
failure_handler = body.find('failure')
|
||||
if failure_handler is not None:
|
||||
log.warning(
|
||||
"Handling errors ({0}) in failure block".format(errors),
|
||||
exc_info=True)
|
||||
engine.evaluate_content(failure_handler, context)
|
||||
else:
|
||||
log.error("No failure block found for exception")
|
||||
log.error("No failure block found for errors", exc_info=True)
|
||||
if isinstance(result_value, AgentTimeoutException):
|
||||
raise result_value
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user