summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-12-13 21:37:03 +0000
committerGerrit Code Review <review@openstack.org>2022-12-13 21:37:03 +0000
commitf96b258709dc4057e3034dda0a62e0d894466084 (patch)
tree1b8e37b8a7ceef5f3835bf7db2f21fc15dd621a3
parentf6bc139c6dcfa877051f59e5ce354f72fa07d8e9 (diff)
parentaca8ebc0640cbef5eb9fa898be08dfe8d3a0f4ae (diff)
downloadironic-f96b258709dc4057e3034dda0a62e0d894466084.tar.gz
Merge "Catch any exception for Cleaning"
-rw-r--r--ironic/conductor/cleaning.py5
-rw-r--r--releasenotes/notes/catch-all-cleaning-exceptions-1317a534a1c9db56.yaml8
2 files changed, 11 insertions, 2 deletions
diff --git a/ironic/conductor/cleaning.py b/ironic/conductor/cleaning.py
index 53d66ddd8..e59841a99 100644
--- a/ironic/conductor/cleaning.py
+++ b/ironic/conductor/cleaning.py
@@ -114,8 +114,9 @@ def do_node_clean(task, clean_steps=None, disable_ramdisk=False):
try:
conductor_steps.set_node_cleaning_steps(
task, disable_ramdisk=disable_ramdisk)
- except (exception.InvalidParameterValue,
- exception.NodeCleaningFailure) as e:
+ except Exception as e:
+ # Catch all exceptions and follow the error handling
+ # path so things are cleaned up properly.
msg = (_('Cannot clean node %(node)s: %(msg)s')
% {'node': node.uuid, 'msg': e})
return utils.cleaning_error_handler(task, msg)
diff --git a/releasenotes/notes/catch-all-cleaning-exceptions-1317a534a1c9db56.yaml b/releasenotes/notes/catch-all-cleaning-exceptions-1317a534a1c9db56.yaml
new file mode 100644
index 000000000..eb3cc61f9
--- /dev/null
+++ b/releasenotes/notes/catch-all-cleaning-exceptions-1317a534a1c9db56.yaml
@@ -0,0 +1,8 @@
+---
+fixes:
+ - |
+ Fixes an issue where unexpected exceptions coming from the process to
+ start cleaning would not trigger the cleaning_error_handler which
+ performs the needful internal resets to permit cleaning to be retried
+ again in the future. Now any error which is encountered during the
+ launch of cleaning will trigger the error handler.