]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: don't attempt daemon actions for daemons on offline hosts
authorAdam King <kingamk3@gmail.com>
Sun, 15 Jan 2023 21:30:53 +0000 (16:30 -0500)
committerAdam King <adking@redhat.com>
Mon, 6 Feb 2023 13:38:40 +0000 (08:38 -0500)
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 <adking@redhat.com>
src/pybind/mgr/cephadm/serve.py

index 364f8324dc065f5bf4bbadc90d14ef82d6ed025b..0b9fc5c9923433c39281d9f3e5db859f72f7446a 100644 (file)
@@ -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)