]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: fix broken backporting 37505/head
authorErnesto Puerta <epuertat@redhat.com>
Thu, 1 Oct 2020 10:43:52 +0000 (12:43 +0200)
committerErnesto Puerta <epuertat@redhat.com>
Thu, 1 Oct 2020 14:24:52 +0000 (16:24 +0200)
A [previous backport](https://github.com/ceph/ceph/pull/35367) from a
[master PR](https://github.com/ceph/ceph/pull/32829) changed the testing
condition for PG status from 'incomplete' to 'unknown'.

Fixes: https://tracker.ceph.com/issues/46815
Co-authored-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
src/pybind/mgr/dashboard/services/rbd.py
src/pybind/mgr/dashboard/tests/test_rbd_service.py

index fbec61049b90306d224ceaa1426c96d243ffea93..55c6f542c0a5242a7ad0823c433da6479fd4fb15 100644 (file)
@@ -87,7 +87,7 @@ class RbdConfiguration(object):
                     result = []
             else:  # pool config
                 pg_status = list(CephService.get_pool_pg_status(self._pool_name).keys())
-                if len(pg_status) == 1 and 'unknown' in pg_status[0]:
+                if len(pg_status) == 1 and 'incomplete' in pg_status[0]:
                     # If config_list would be called with ioctx if it's a bad pool,
                     # the dashboard would stop working, waiting for the response
                     # that would not happen.
index bd0da4020c118d356fd0caa7bc59d26012c8f93b..a4511fa9d1234be86c1f2a9b44adbde77b5adcc7 100644 (file)
@@ -27,7 +27,7 @@ class RbdServiceTest(unittest.TestCase):
         get.return_value = {
             'by_pool': {
                 '1': {'active+clean': 32},
-                '2': {'unknown': 32},
+                '2': {'creating+incomplete': 32},
             }
         }
         config_list.return_value = [1, 2, 3]