]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/cephadm: updating maintenance health status in the serve loop
authorSam Goyal <sam.goyal@clyso.com>
Wed, 9 Jul 2025 00:45:14 +0000 (17:45 -0700)
committerAdam King <adking@redhat.com>
Mon, 28 Jul 2025 20:30:33 +0000 (16:30 -0400)
commit554be8c47888c6f344472be90b2d0520df16113c
treebf21c6b15e8dee1271345c65867518fb234bde5b
parent116421b61151f6d2611f69ccb6263f9583fdcaf0
mgr/cephadm: updating maintenance health status in the serve loop

The HOST_IN_MAINTENANCE health warning would disappear when the ceph manager
restarted or failed over, even though hosts remained in maintenance mode.
This occurred because set_maintenance_healthcheck() was only called during
host state transitions, not consistently during the serve loop.

This commit changes the function name from set_maintenance_healthcheck() to update_maintenance_healthcheck()
and then adds a call to update_maintenance_healthcheck() in the serve loop
to ensure maintenance health warnings are restored and persist across
manager restarts, similar to how the global pause health warning is handled.

Fixes: https://tracker.ceph.com/issues/72034
Signed-off-by: Sam Goyal <sam.goyal@clyso.com>
fixed test

(cherry picked from commit de4d7a954a57420d02a320b8b2144edc7be81057)
src/pybind/mgr/cephadm/module.py
src/pybind/mgr/cephadm/serve.py
src/pybind/mgr/cephadm/tests/test_cephadm.py