]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: Fixed warn_on_stray_hosts setting
authorAndreas Haase <andreas.haase@community4you.de>
Tue, 14 Apr 2020 15:09:04 +0000 (17:09 +0200)
committerSebastian Wagner <sebastian.wagner@suse.com>
Wed, 22 Apr 2020 13:06:38 +0000 (15:06 +0200)
Fixes: https://tracker.ceph.com/issues/45065
Signed-off-by: Andreas Haase <andreas.haase@community4you.de>
(cherry picked from commit b07c2da63f9fb9e70a647a989675bbdf309c14f3)

src/pybind/mgr/cephadm/module.py

index 19723b93dcad91851c3249358f51f59b97c7ee0f..73581c99e4a62b1fcbcc71766ec3c9b640bb735c 100644 (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' % (