From 489383f496683e96060d20c35fc7885d621666a8 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 (cherry picked from commit b07c2da63f9fb9e70a647a989675bbdf309c14f3) --- 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 19723b93dcad9..73581c99e4a62 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -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' % ( -- 2.39.5