Browse Source

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
tags/7.0.0.0rc1
Dougal Matthews 11 months ago
parent
commit
df46ec72b9
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      mistral/executors/default_executor.py

+ 3
- 3
mistral/executors/default_executor.py View File

@@ -123,8 +123,8 @@ class DefaultExecutor(base.Executor):
123 123
 
124 124
         except BaseException as e:
125 125
             msg = (
126
-                "Failed to run action [action_ex_id=%s, action_cls='%s', "
127
-                "attributes='%s', params='%s']\n %s" % (
126
+                "The action raised an exception [action_ex_id=%s, "
127
+                "action_cls='%s', attributes='%s', params='%s']\n %s" % (
128 128
                     action_ex_id,
129 129
                     action_cls,
130 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 138
             return send_error_back(msg)
139 139
 

Loading…
Cancel
Save