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: wip-pdonnell-testing-20200918.022351~869^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=0716b0556996ce34b628611274064cbf05fef97c;p=ceph-ci.git mgr/cephadm: speedup _refresh_hosts_and_daemons by 10x by calling 10 hosts in parallel. Signed-off-by: Sebastian Wagner --- diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 8bdfe2bdbbc..6e87f4c6f5d 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -1118,7 +1118,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: @@ -1139,7 +1141,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: