mirror of
https://github.com/ceph/ceph
synced 2025-02-22 02:27:29 +00:00
mgr/cephadm: default status for daemons on maintenance hosts to stopped
we do not refresh the daemons on maintenance hosts so our info on them is always outdated. Therefore, the best option is to assume maintenance mode is working correctly and the daemons are stopped Signed-off-by: Adam King <adking@redhat.com>
This commit is contained in:
parent
477b705fe7
commit
56641742a7
@ -524,6 +524,11 @@ class HostCache():
|
||||
if host in self.mgr.offline_hosts:
|
||||
dd.status = orchestrator.DaemonDescriptionStatus.error
|
||||
dd.status_desc = 'host is offline'
|
||||
elif self.mgr.inventory._inventory[host].get("status", "").lower() == "maintenance":
|
||||
# We do not refresh daemons on hosts in maintenance mode, so stored daemon statuses
|
||||
# could be wrong. We must assume maintenance is working and daemons are stopped
|
||||
dd.status = orchestrator.DaemonDescriptionStatus.stopped
|
||||
dd.status_desc = 'stopped'
|
||||
dd.events = self.mgr.events.get_for_daemon(dd.name())
|
||||
return dd
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user