From e1a38794e5c3a2c5c6b05a42f708c9a42cf07547 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Fri, 20 Mar 2020 15:17:03 +0100 Subject: [PATCH] mgr/cephadm: remove unused method `_check_hosts` Signed-off-by: Sebastian Wagner (cherry picked from commit e093c3754382f64133178b78d30d113e0f660bb9) --- src/pybind/mgr/cephadm/module.py | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index 8bdac2fb08b97..5d3e4c03cdec8 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -997,38 +997,6 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule): self._save_upgrade_state() return - def _check_hosts(self): - self.log.debug('_check_hosts') - bad_hosts = [] - hosts = self.inventory.keys() - for host in hosts: - if host not in self.inventory: - continue - self.log.debug(' checking %s' % host) - try: - out, err, code = self._run_cephadm( - host, 'client', 'check-host', [], - error_ok=True, no_fsid=True) - if code: - self.log.debug(' host %s failed check' % host) - if self.warn_on_failed_host_check: - bad_hosts.append('host %s failed check: %s' % (host, err)) - else: - self.log.debug(' host %s ok' % host) - except Exception as e: - self.log.debug(' host %s failed check' % host) - bad_hosts.append('host %s failed check: %s' % (host, e)) - if 'CEPHADM_HOST_CHECK_FAILED' in self.health_checks: - del self.health_checks['CEPHADM_HOST_CHECK_FAILED'] - if bad_hosts: - self.health_checks['CEPHADM_HOST_CHECK_FAILED'] = { - 'severity': 'warning', - 'summary': '%d hosts fail cephadm check' % len(bad_hosts), - 'count': len(bad_hosts), - 'detail': bad_hosts, - } - self.set_health_checks(self.health_checks) - def _check_host(self, host): if host not in self.inventory: return -- 2.39.5