Merge pull request #34555 from ahaase-c4u/45065

mgr/cephadm: Fixed warn_on_stray_hosts setting

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
This commit is contained in:
Sebastian Wagner 2020-04-15 11:41:26 +02:00 committed by GitHub
commit dce6285cad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1068,7 +1068,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule):
host_detail.append(
'stray host %s has %d stray daemons: %s' % (
host, len(missing_names), missing_names))
if host_detail:
if self.warn_on_stray_hosts and host_detail:
self.health_checks['CEPHADM_STRAY_HOST'] = {
'severity': 'warning',
'summary': '%d stray host(s) with %s daemon(s) '
@ -1077,7 +1077,7 @@ class CephadmOrchestrator(orchestrator.Orchestrator, MgrModule):
'count': len(host_detail),
'detail': host_detail,
}
if daemon_detail:
if self.warn_on_stray_daemons and daemon_detail:
self.health_checks['CEPHADM_STRAY_DAEMON'] = {
'severity': 'warning',
'summary': '%d stray daemons(s) not managed by cephadm' % (