From 6c404da6943dd7bebb7b2fa9f9cc1269c905314e Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Wed, 27 Nov 2019 12:03:21 -0500 Subject: [PATCH] mgr/dashboard: properly handle a missing rbd-mirror service status This was resulting in 500 errors in the dashboard due to the missing status being handled like a dict. Fixes: https://tracker.ceph.com/issues/43029 Signed-off-by: Jason Dillaman (cherry picked from commit 499d749e3f96ef9af0fa2381a47efc2a745eff45) --- src/pybind/mgr/dashboard/controllers/rbd_mirroring.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind/mgr/dashboard/controllers/rbd_mirroring.py b/src/pybind/mgr/dashboard/controllers/rbd_mirroring.py index cb4f1cea7721f..0f6574a4667c3 100644 --- a/src/pybind/mgr/dashboard/controllers/rbd_mirroring.py +++ b/src/pybind/mgr/dashboard/controllers/rbd_mirroring.py @@ -50,7 +50,7 @@ def get_daemons_and_pools(): # pylint: disable=R0915 for service in server['services']: id = service['id'] # pylint: disable=W0622 metadata = service['metadata'] - status = service['status'] + status = service['status'] or {} try: status = json.loads(status['json']) -- 2.39.5