]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/prometheus: raise at seeing unknown status
authorKefu Chai <kchai@redhat.com>
Fri, 26 Feb 2021 04:15:03 +0000 (12:15 +0800)
committerSage Weil <sage@newdream.net>
Tue, 16 Mar 2021 13:04:54 +0000 (08:04 -0500)
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit f92aa2f48a8801d31dac092ca53b48d07315bed4)

src/pybind/mgr/prometheus/module.py

index 222ffd85832557b185a62e69deeb83a76831eebc..f28f0043d9eb05702123b73b9b9597fc5ecdc6cb 100644 (file)
@@ -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']