From: Sage Weil Date: Fri, 14 Sep 2018 14:00:18 +0000 (-0500) Subject: mgr/devicehealth: squelch health warnings for unused devices X-Git-Tag: v14.0.1~255^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=230e293a33a004eeefb8420a9a94947459148d4e;p=ceph.git mgr/devicehealth: squelch health warnings for unused devices 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 --- diff --git a/src/pybind/mgr/devicehealth/module.py b/src/pybind/mgr/devicehealth/module.py index ac288d56e3bf..bed46c9e9a84 100644 --- a/src/pybind/mgr/devicehealth/module.py +++ b/src/pybind/mgr/devicehealth/module.py @@ -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'