]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/devicehealth: squelch health warnings for unused devices
authorSage Weil <sage@redhat.com>
Fri, 14 Sep 2018 14:00:18 +0000 (09:00 -0500)
committerSage Weil <sage@redhat.com>
Fri, 14 Sep 2018 17:43:58 +0000 (12:43 -0500)
We may also want to do the same for OSDs that are out and fully offloaded,
but that can wait until those OSDs go into a special "drive device to
failure" mode.

Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/devicehealth/module.py

index ac288d56e3bf1416c51df52658d225f9373888fa..bed46c9e9a843aee000ccd9523b5f01a50119096 100644 (file)
@@ -410,6 +410,9 @@ class Module(MgrModule):
             devid = dev['devid']
             if 'life_expectancy_min' not in dev:
                 continue
+            # ignore devices that are not consumed by any daemons
+            if not dev['daemons']:
+                continue
             # life_expectancy_(min/max) is in the format of:
             # '%Y-%m-%d %H:%M:%S.%f', e.g.:
             # '2019-01-20 21:12:12.000000'