From 230e293a33a004eeefb8420a9a94947459148d4e Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 14 Sep 2018 09:00:18 -0500 Subject: [PATCH] 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 --- src/pybind/mgr/devicehealth/module.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pybind/mgr/devicehealth/module.py b/src/pybind/mgr/devicehealth/module.py index ac288d56e3b..bed46c9e9a8 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' -- 2.39.5