From: Kefu Chai Date: Fri, 26 Feb 2021 04:15:03 +0000 (+0800) Subject: mgr/prometheus: raise at seeing unknown status X-Git-Tag: v17.1.0~2710^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f92aa2f48a8801d31dac092ca53b48d07315bed4;p=ceph.git mgr/prometheus: raise at seeing unknown status Signed-off-by: Kefu Chai --- 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']