return None
self.log.debug(' checking %s' % host)
try:
+ addr = self.mgr.inventory.get_addr(host) if host in self.mgr.inventory else host
out, err, code = self._run_cephadm(
host, cephadmNoImage, 'check-host', [],
error_ok=True, no_fsid=True)
self.mgr.cache.update_last_host_check(host)
self.mgr.cache.save_host(host)
if code:
- self.log.debug(' host %s failed check' % host)
+ self.log.debug(' host %s (%s) failed check' % (host, addr))
if self.mgr.warn_on_failed_host_check:
- return 'host %s failed check: %s' % (host, err)
+ return 'host %s (%s) failed check: %s' % (host, addr, err)
else:
- self.log.debug(' host %s ok' % host)
+ self.log.debug(' host %s (%s) ok' % (host, addr))
except Exception as e:
- self.log.debug(' host %s failed check' % host)
- return 'host %s failed check: %s' % (host, e)
+ self.log.debug(' host %s (%s) failed check' % (host, addr))
+ return 'host %s (%s) failed check: %s' % (host, addr, e)
return None
def _refresh_host_daemons(self, host: str) -> Optional[str]: