]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: No daemon and device refresh if host if out
authorSebastian Wagner <sebastian.wagner@suse.com>
Fri, 20 Mar 2020 14:15:20 +0000 (15:15 +0100)
committerSebastian Wagner <sebastian.wagner@suse.com>
Tue, 14 Apr 2020 14:50:50 +0000 (16:50 +0200)
To make things faster

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
(cherry picked from commit 201a9c17eeb1051ce562205d316f4baeebb58b5f)

src/pybind/mgr/cephadm/module.py

index d78986a27a90e7db2127e3601381a2a2390c93fb..184ce95d99d6e5daa4d1aaf36910df9c34b3192b 100644 (file)
@@ -343,6 +343,9 @@ class HostCache():
 
     def host_needs_daemon_refresh(self, host):
         # type: (str) -> bool
+        if host in self.mgr.offline_hosts:
+            logger.debug(f'Host "{host}" marked as offline. Skipping daemon refresh')
+            return False
         if host in self.daemon_refresh_queue:
             self.daemon_refresh_queue.remove(host)
             return True
@@ -354,6 +357,9 @@ class HostCache():
 
     def host_needs_device_refresh(self, host):
         # type: (str) -> bool
+        if host in self.mgr.offline_hosts:
+            logger.debug(f'Host "{host}" marked as offline. Skipping device refresh')
+            return False
         if host in self.device_refresh_queue:
             self.device_refresh_queue.remove(host)
             return True