Clarify what an exception from an action means
When Python actions raise an exception they may not have failed to run. This may not even be an issue. For example, the OpenStack action `swift.head_container` will raise an exception is the container doesn't exist. This change lowers the exception to a warning but keeps the exception traceback in the logs. It also changes the wording in the message. We didn't fail to run the action, rather the action raise an exception. Change-Id: If9a6a3b98999acae8b80ad4ddeb9d197a628c280
This commit is contained in:
parent
b01d6c6642
commit
df46ec72b9
|
@ -123,8 +123,8 @@ class DefaultExecutor(base.Executor):
|
||||||
|
|
||||||
except BaseException as e:
|
except BaseException as e:
|
||||||
msg = (
|
msg = (
|
||||||
"Failed to run action [action_ex_id=%s, action_cls='%s', "
|
"The action raised an exception [action_ex_id=%s, "
|
||||||
"attributes='%s', params='%s']\n %s" % (
|
"action_cls='%s', attributes='%s', params='%s']\n %s" % (
|
||||||
action_ex_id,
|
action_ex_id,
|
||||||
action_cls,
|
action_cls,
|
||||||
action_cls_attrs,
|
action_cls_attrs,
|
||||||
|
@ -133,7 +133,7 @@ class DefaultExecutor(base.Executor):
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
LOG.exception(msg)
|
LOG.warning(msg, exc_info=True)
|
||||||
|
|
||||||
return send_error_back(msg)
|
return send_error_back(msg)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue