From 2b5dc286ab8a3d38f06fced18930c3c1477dea49 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 9 Jul 2021 13:10:28 -0400 Subject: [PATCH] Correct failure to get ceph_health data --- node-daemon/pvcnoded/Daemon.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/node-daemon/pvcnoded/Daemon.py b/node-daemon/pvcnoded/Daemon.py index 2f2ee0a1..eb653de6 100644 --- a/node-daemon/pvcnoded/Daemon.py +++ b/node-daemon/pvcnoded/Daemon.py @@ -1322,10 +1322,13 @@ def collect_ceph_stats(queue): ceph_health = json.loads(stdout)['status'] except Exception as e: logger.out('Failed to obtain Ceph health data: {}'.format(e), state='e') + ceph_health = 'HEALTH_UNKN' - if ceph_health == 'HEALTH_OK': + if ceph_health in ['HEALTH_OK']: ceph_health_colour = fmt_green - elif ceph_health == 'HEALTH_WARN': + elif ceph_health in ['HEALTH_UNKN']: + ceph_health_colour = fmt_cyan + elif ceph_health in ['HEALTH_WARN']: ceph_health_colour = fmt_yellow else: ceph_health_colour = fmt_red