From 48acc6c7981ef6cbb962883cd36e2666a16d9c23 Mon Sep 17 00:00:00 2001 From: John Spray Date: Sun, 8 Apr 2018 15:21:27 +0100 Subject: [PATCH] mgr/prometheus: fix and complete PG state names ...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 --- src/pybind/mgr/prometheus/module.py | 35 +++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/src/pybind/mgr/prometheus/module.py b/src/pybind/mgr/prometheus/module.py index a6dc5d1969e33..2414ca5eb2fc6 100644 --- a/src/pybind/mgr/prometheus/module.py +++ b/src/pybind/mgr/prometheus/module.py @@ -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'] -- 2.39.5