From: Kefu Chai Date: Fri, 26 Feb 2021 04:15:03 +0000 (+0800) Subject: mgr/prometheus: raise at seeing unknown status X-Git-Tag: v16.2.0~106^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=731597c9108d2b425d1f9fcf689750a6cc76bdf8;p=ceph.git mgr/prometheus: raise at seeing unknown status Signed-off-by: Kefu Chai (cherry picked from commit f92aa2f48a8801d31dac092ca53b48d07315bed4) --- diff --git a/src/pybind/mgr/prometheus/module.py b/src/pybind/mgr/prometheus/module.py index 222ffd858325..f28f0043d9eb 100644 --- a/src/pybind/mgr/prometheus/module.py +++ b/src/pybind/mgr/prometheus/module.py @@ -63,6 +63,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']