]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/prometheus: fix and complete PG state names
authorJohn Spray <john.spray@redhat.com>
Sun, 8 Apr 2018 14:21:27 +0000 (15:21 +0100)
committerBoris Ranto <branto@redhat.com>
Thu, 19 Apr 2018 17:47:59 +0000 (19:47 +0200)
...and reformat into a flat list in the same
order as found in osd_types.cc so that it's
easy to cross check.

Fixes: https://tracker.ceph.com/issues/23584
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 48acc6c7981ef6cbb962883cd36e2666a16d9c23)

src/pybind/mgr/prometheus/module.py

index 7c7241c5d111b7902c6c22ac51bdb5d0a1e8fbbe..da3b91725d7a84979a2dc5d98422b4bdcddf46ef 100644 (file)
@@ -43,10 +43,37 @@ def health_status_to_number(status):
     elif status == 'HEALTH_ERR':
         return 2
 
-PG_STATES = ['creating', 'active', 'clean', 'down', 'scrubbing', 'deep', 'degraded',
-        'inconsistent', 'peering', 'repair', 'recovering', 'forced-recovery',
-        'backfill', 'forced-backfill', 'wait-backfill', 'backfill-toofull',
-        'incomplete', 'stale', 'remapped', 'undersized', 'peered']
+PG_STATES = [
+        "active",
+        "clean",
+        "down",
+        "recovery_unfound",
+        "backfill_unfound",
+        "scrubbing",
+        "degraded",
+        "inconsistent",
+        "peering",
+        "repair",
+        "recovering",
+        "forced_recovery",
+        "backfill_wait",
+        "incomplete",
+        "stale",
+        "remapped",
+        "deep",
+        "backfilling",
+        "forced_backfill",
+        "backfill_toofull",
+        "recovery_wait",
+        "recovery_toofull",
+        "undersized",
+        "activating",
+        "peered",
+        "snaptrim",
+        "snaptrim_wait",
+        "snaptrim_error",
+        "creating",
+        "unknown"]
 
 DF_CLUSTER = ['total_bytes', 'total_used_bytes', 'total_objects']