From f92aa2f48a8801d31dac092ca53b48d07315bed4 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 26 Feb 2021 12:15:03 +0800 Subject: [PATCH] mgr/prometheus: raise at seeing unknown status Signed-off-by: Kefu Chai --- src/pybind/mgr/prometheus/module.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pybind/mgr/prometheus/module.py b/src/pybind/mgr/prometheus/module.py index 0f4048391f5b..2cfedf152e7e 100644 --- a/src/pybind/mgr/prometheus/module.py +++ b/src/pybind/mgr/prometheus/module.py @@ -62,6 +62,7 @@ def health_status_to_number(status): return 1 elif status == 'HEALTH_ERR': return 2 + raise ValueError(f'unknown status "{status}"') DF_CLUSTER = ['total_bytes', 'total_used_bytes', 'total_used_raw_bytes'] -- 2.47.3