]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: properly handle a missing rbd-mirror service status 32133/head
authorJason Dillaman <dillaman@redhat.com>
Wed, 27 Nov 2019 17:03:21 +0000 (12:03 -0500)
committerJason Dillaman <dillaman@redhat.com>
Mon, 9 Dec 2019 17:00:55 +0000 (12:00 -0500)
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 <dillaman@redhat.com>
(cherry picked from commit 499d749e3f96ef9af0fa2381a47efc2a745eff45)

src/pybind/mgr/dashboard/controllers/rbd_mirroring.py

index cb4f1cea7721f5879258eee2331d001813f6dcbe..0f6574a4667c3aad9ad6afb4e85a9c04356a1a1e 100644 (file)
@@ -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'])