]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/cephadm: clear error message when resuming upgrade 47375/head
authorAdam King <adking@redhat.com>
Tue, 26 Jul 2022 13:55:05 +0000 (09:55 -0400)
committerAdam King <adking@redhat.com>
Sun, 31 Jul 2022 18:33:05 +0000 (14:33 -0400)
commitfdbb5ed40aec6f09f8f20b292965446299413e1e
treeb229d5bff419a031100d25f5dc6469d5596048e1
parent15ec48139dc9e86636331e03e2e37ef9e7886559
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 <adking@redhat.com>
(cherry picked from commit 429561ccb7b524f071214ff3aad99ba8830a924c)
src/pybind/mgr/cephadm/upgrade.py