]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: properly handle a missing rbd-mirror service status 31907/head
authorJason Dillaman <dillaman@redhat.com>
Wed, 27 Nov 2019 17:03:21 +0000 (12:03 -0500)
committerJason Dillaman <dillaman@redhat.com>
Wed, 27 Nov 2019 17:06:44 +0000 (12:06 -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>
src/pybind/mgr/dashboard/controllers/rbd_mirroring.py

index 1d0a360b497f7487f8eb5e4c803a9bc6fc050569..ee22be032d86eccce00994398c0fc3e014c327b0 100644 (file)
@@ -47,7 +47,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'])