From: Sebastian Wagner Date: Fri, 19 Jun 2020 15:27:58 +0000 (+0200) Subject: mgr/cephadm: speedup _refresh_hosts_and_daemons by 10x X-Git-Tag: v15.2.5~147^2~26 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ac8366614f5293629332575a2145bbe078ced4cd;p=ceph.git mgr/cephadm: speedup _refresh_hosts_and_daemons by 10x by calling 10 hosts in parallel. Signed-off-by: Sebastian Wagner (cherry picked from commit 0716b0556996ce34b628611274064cbf05fef97c) --- diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index d3416ec03ea0..5675912f1626 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -1123,7 +1123,9 @@ you may want to run: def _refresh_hosts_and_daemons(self): bad_hosts = [] failures = [] - for host in self.cache.get_hosts(): + + @forall_hosts + def refresh(host): if self.cache.host_needs_check(host): r = self._check_host(host) if r is not None: @@ -1144,7 +1146,8 @@ you may want to run: r = self._refresh_host_osdspec_previews(host) if r: failures.append(r) - + + refresh(self.cache.get_hosts()) health_changed = False if 'CEPHADM_HOST_CHECK_FAILED' in self.health_checks: