]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: clear error message when resuming upgrade 47280/head
authorAdam King <adking@redhat.com>
Tue, 26 Jul 2022 13:55:05 +0000 (09:55 -0400)
committerAdam King <adking@redhat.com>
Fri, 29 Jul 2022 22:52:11 +0000 (18:52 -0400)
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 <adking@redhat.com>
src/pybind/mgr/cephadm/upgrade.py

index baa3cce161ccd95e16e869e7b31c9aa513f4d397..c2cc0aff9775a7429d21eeb4672800d9f8d11439 100644 (file)
@@ -456,6 +456,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()