diff options
author | Julia Kreger <juliaashleykreger@gmail.com> | 2020-03-23 11:15:25 -0700 |
---|---|---|
committer | Dmitry Tantsur <dtantsur@protonmail.com> | 2020-04-06 08:20:25 +0000 |
commit | ac6de2b2560820c7c4f929ba2ec8293d782fd9ca (patch) | |
tree | 91cd3ebd769302aab00363ae8607b3dd2f9b4009 | |
parent | 9c116c4ef3d10a2eadb0fb0ddd13eae24a470f99 (diff) | |
download | ironic-ac6de2b2560820c7c4f929ba2ec8293d782fd9ca.tar.gz |
Make deploy step failure logging indicate the error
Deploy step logging would previously only log the step to the API
user, instead of anything the API user could use to try and determine
what is wrong.
Example:
- Trying to power on a machine as part of deploy.deploy()
- Power-on operation fails
- Only the deploy step is listed as the error, and no
additional information to troubleshoot the issue,
which forced the operator to go examine logs and
find the error.
Change-Id: If60b96dcafa446de090df56089760eda3a21109d
(cherry picked from commit 6a1d453ef0dd9536e500ff8c45846826dca40e8b)
-rw-r--r-- | ironic/conductor/manager.py | 5 | ||||
-rw-r--r-- | releasenotes/notes/deploy-step-error-d343e8cb7d1b2305.yaml | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/ironic/conductor/manager.py b/ironic/conductor/manager.py index 466e96c53..677d2d0c2 100644 --- a/ironic/conductor/manager.py +++ b/ironic/conductor/manager.py @@ -3862,7 +3862,10 @@ def _do_next_deploy_step(task, step_index, conductor_id): {'node': node.uuid, 'step': node.deploy_step, 'err': e}) utils.deploying_error_handler( task, log_msg, - _("Failed to deploy: %s") % node.deploy_step) + _("Failed to deploy: Deploy step %(step)s, " + "error: %(err)s.") % { + 'step': node.deploy_step, + 'err': e}) return except Exception as e: log_msg = ('Node %(node)s failed deploy step %(step)s with ' diff --git a/releasenotes/notes/deploy-step-error-d343e8cb7d1b2305.yaml b/releasenotes/notes/deploy-step-error-d343e8cb7d1b2305.yaml new file mode 100644 index 000000000..9af1e9782 --- /dev/null +++ b/releasenotes/notes/deploy-step-error-d343e8cb7d1b2305.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes vague node ``last_error`` field reporting upon deploy step + failure by providing the exception error message in addition + to the step that failed. |