From b07c2da63f9fb9e70a647a989675bbdf309c14f3 Mon Sep 17 00:00:00 2001 From: Andreas Haase Date: Tue, 14 Apr 2020 17:09:04 +0200 Subject: [PATCH] mgr/cephadm: Fixed warn_on_stray_hosts setting Fixes: https://tracker.ceph.com/issues/45065 Signed-off-by: Andreas Haase --- src/pybind/mgr/cephadm/module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index b730888e5c4eb..bb623ef6496c1 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -1069,7 +1069,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) ' @@ -1078,7 +1078,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' % ( -- 2.39.5