diff --git a/mistral/executors/executor_server.py b/mistral/executors/executor_server.py index 767ff4001..175ef8e5f 100644 --- a/mistral/executors/executor_server.py +++ b/mistral/executors/executor_server.py @@ -87,7 +87,7 @@ class ExecutorServer(service_base.MistralService): :return: Action result. """ - LOG.info( + LOG.debug( "Received RPC request 'run_action'[action_ex_id=%s, " "action_cls_str=%s, action_cls_attrs=%s, params=%s, " "timeout=%s]", @@ -103,7 +103,7 @@ class ExecutorServer(service_base.MistralService): try: self._aer.add_action_ex_id(action_ex_id) - return self.executor.run_action( + res = self.executor.run_action( action_ex_id, action_cls_str, action_cls_attrs, @@ -113,6 +113,15 @@ class ExecutorServer(service_base.MistralService): redelivered, timeout=timeout ) + + LOG.debug( + "Sending action result to engine" + " [action_ex_id=%s, action_cls=%s]", + action_ex_id, + action_cls_str + ) + + return res finally: self._aer.remove_action_ex_id(action_ex_id) diff --git a/mistral/rpc/clients.py b/mistral/rpc/clients.py index 39e88f17b..ce2219b56 100644 --- a/mistral/rpc/clients.py +++ b/mistral/rpc/clients.py @@ -381,6 +381,11 @@ class ExecutorClient(exe.Executor): rpc_client_method = (self._client.async_call if async_ else self._client.sync_call) + LOG.debug( + "Sending an action to executor [action_ex_id=%s, action_cls=%s]", + action_ex_id, action_cls_str + ) + return rpc_client_method(auth_ctx.ctx(), 'run_action', **rpc_kwargs) diff --git a/releasenotes/notes/add_more_logging_for_sending_actions-c2ddd97027803ecd.yaml b/releasenotes/notes/add_more_logging_for_sending_actions-c2ddd97027803ecd.yaml new file mode 100644 index 000000000..af8a18377 --- /dev/null +++ b/releasenotes/notes/add_more_logging_for_sending_actions-c2ddd97027803ecd.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Mistral doesn't log enough info about sending actions to executor and + receiving them on the executor side. It makes it hard to debug + situations when an action got stuck in RUNNING state. It has now been + fixed by adding additional log statements.