From: Adam King Date: Sun, 15 Jan 2023 21:30:53 +0000 (-0500) Subject: mgr/cephadm: don't attempt daemon actions for daemons on offline hosts X-Git-Tag: v18.1.0~349^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e1d3e38f87bce4e53eb7e4c29c812a7ed750fa80;p=ceph.git mgr/cephadm: don't attempt daemon actions for daemons on offline hosts They'll just fail anyway, and it will waste time waiting for the connection to timeout. We have other places in the serve loop that will check if the host is back online. Signed-off-by: Adam King --- diff --git a/src/pybind/mgr/cephadm/serve.py b/src/pybind/mgr/cephadm/serve.py index 364f8324dc06..0b9fc5c99234 100644 --- a/src/pybind/mgr/cephadm/serve.py +++ b/src/pybind/mgr/cephadm/serve.py @@ -934,6 +934,12 @@ class CephadmServe: assert dd.hostname is not None assert dd.daemon_type is not None assert dd.daemon_id is not None + + # any action we can try will fail for a daemon on an offline host, + # including removing the daemon + if dd.hostname in self.mgr.offline_hosts: + continue + if not spec and dd.daemon_type not in ['mon', 'mgr', 'osd']: # (mon and mgr specs should always exist; osds aren't matched # to a service spec)