From fdbb5ed40aec6f09f8f20b292965446299413e1e Mon Sep 17 00:00:00 2001 From: Adam King Date: Tue, 26 Jul 2022 09:55:05 -0400 Subject: [PATCH] mgr/cephadm: clear error message when resuming upgrade the message field in the output of "ceph orch upgrade status" will first take the value of the error field of the UpgradeState, and if only if it blank/None, display an info string we periodically update throughout the upgrade with useful info such as that we're upgrading a daemon of a particular type or pulling an image on a certain host. When an upgrade fails, we set the error field of the UpgradeState, pause the upgrade and raise a health warning. Sometimes, the user is able to resolve the issue and simply resume the upgrade. The issue here is, in that case, the error field of the UpgradeState is still set, so instead of seeing the useful info messages, it will continue to display an error message that may no longer be relevant. By emptying the error field of the UpgradeState when upgrades are resumed, we return to normal behavior of displaying the info string, and will only show another error message if another error actually occurs. Fixes: https://tracker.ceph.com/issues/56714 Signed-off-by: Adam King (cherry picked from commit 429561ccb7b524f071214ff3aad99ba8830a924c) --- src/pybind/mgr/cephadm/upgrade.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pybind/mgr/cephadm/upgrade.py b/src/pybind/mgr/cephadm/upgrade.py index 456ae9703c47..db39fe76a338 100644 --- a/src/pybind/mgr/cephadm/upgrade.py +++ b/src/pybind/mgr/cephadm/upgrade.py @@ -443,6 +443,7 @@ class CephadmUpgrade: if not self.upgrade_state.paused: return 'Upgrade to %s not paused' % self.target_image self.upgrade_state.paused = False + self.upgrade_state.error = '' self.mgr.log.info('Upgrade: Resumed upgrade to %s' % self.target_image) self._save_upgrade_state() self.mgr.event.set() -- 2.47.3