summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDougal Matthews <dougal@redhat.com>2018-07-30 12:11:11 +0100
committerDougal Matthews <dougal@redhat.com>2018-07-31 15:00:11 +0100
commitdf46ec72b944a8902194002d91935ee44aed8ad7 (patch)
tree4ed21e647719336e2d55ebaf79035bb893de5d41
parentb01d6c6642b01461851aee5ac7709185c478e320 (diff)
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
Notes
Notes (review): Code-Review+1: Toure Dunnon <toure@redhat.com> Code-Review+2: Vitalii Solodilov <Mcdkr@yandex.ru> Code-Review+1: daixianmeng <daixianmeng@yovole.com> Code-Review+1: wu.chunyang <wu.chunyang@99cloud.net> Code-Review+2: Renat Akhmerov <renat.akhmerov@gmail.com> Workflow+1: Renat Akhmerov <renat.akhmerov@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Mon, 06 Aug 2018 06:34:32 +0000 Reviewed-on: https://review.openstack.org/587003 Project: openstack/mistral Branch: refs/heads/master
-rw-r--r--mistral/executors/default_executor.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mistral/executors/default_executor.py b/mistral/executors/default_executor.py
index a2674fb..661901a 100644
--- a/mistral/executors/default_executor.py
+++ b/mistral/executors/default_executor.py
@@ -123,8 +123,8 @@ class DefaultExecutor(base.Executor):
123 123
124 except BaseException as e: 124 except BaseException as e:
125 msg = ( 125 msg = (
126 "Failed to run action [action_ex_id=%s, action_cls='%s', " 126 "The action raised an exception [action_ex_id=%s, "
127 "attributes='%s', params='%s']\n %s" % ( 127 "action_cls='%s', attributes='%s', params='%s']\n %s" % (
128 action_ex_id, 128 action_ex_id,
129 action_cls, 129 action_cls,
130 action_cls_attrs, 130 action_cls_attrs,
@@ -133,7 +133,7 @@ class DefaultExecutor(base.Executor):
133 ) 133 )
134 ) 134 )
135 135
136 LOG.exception(msg) 136 LOG.warning(msg, exc_info=True)
137 137
138 return send_error_back(msg) 138 return send_error_back(msg)
139 139