]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Fix test_full_health test 25913/head
authorTatjana Dehler <tdehler@suse.com>
Fri, 11 Jan 2019 14:08:59 +0000 (15:08 +0100)
committerTatjana Dehler <tdehler@suse.com>
Fri, 11 Jan 2019 15:12:59 +0000 (16:12 +0100)
Fixes: http://tracker.ceph.com/issues/37872
Signed-off-by: Tatjana Dehler <tdehler@suse.com>
qa/tasks/mgr/dashboard/test_health.py
src/pybind/mgr/dashboard/services/ceph_service.py

index d750859eb80611e5cded910648592a9301e5f6a6..71301cb5dbad9b7fc389d65d62a3fda9c9d0c2b6 100644 (file)
@@ -66,7 +66,7 @@ class HealthTest(DashboardTestCase):
                     })),
             }),
             'pg_info': JObj({
-                'pgs_per_osd': int,
+                'pgs_per_osd': float,
                 'statuses': JObj({}, allow_unknown=True, unknown_schema=int)
             }),
             'pools': JList(JLeaf(dict)),
@@ -244,7 +244,7 @@ class HealthTest(DashboardTestCase):
                     }, allow_unknown=True)),
             }, allow_unknown=True),
             'pg_info': JObj({
-                'pgs_per_osd': int,
+                'pgs_per_osd': float,
                 'statuses': JObj({}, allow_unknown=True, unknown_schema=int)
             }),
             'pools': JList(JLeaf(dict)),
index 805ec6adc39dea284f3a23428d6c5d57c226ff0d..ee536ac363dcc8fc0d8318bd99a2aa5f2e7f0330 100644 (file)
@@ -235,10 +235,10 @@ class CephService(object):
     def get_pg_info(cls):
         pg_summary = mgr.get('pg_summary')
 
-        pgs_per_osd = 0
+        pgs_per_osd = 0.0
         total_osds = len(pg_summary['by_osd'])
         if total_osds > 0:
-            total_pgs = 0
+            total_pgs = 0.0
             for _, osd_pg_statuses in pg_summary['by_osd'].items():
                 for _, pg_amount in osd_pg_statuses.items():
                     total_pgs += pg_amount