From 146175a872f153986650df88476134f0df0fbffd Mon Sep 17 00:00:00 2001 From: Tatjana Dehler Date: Fri, 11 Jan 2019 15:08:59 +0100 Subject: [PATCH] mgr/dashboard: Fix test_full_health test Fixes: http://tracker.ceph.com/issues/37872 Signed-off-by: Tatjana Dehler --- qa/tasks/mgr/dashboard/test_health.py | 4 ++-- src/pybind/mgr/dashboard/services/ceph_service.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qa/tasks/mgr/dashboard/test_health.py b/qa/tasks/mgr/dashboard/test_health.py index d750859eb80..71301cb5dba 100644 --- a/qa/tasks/mgr/dashboard/test_health.py +++ b/qa/tasks/mgr/dashboard/test_health.py @@ -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)), diff --git a/src/pybind/mgr/dashboard/services/ceph_service.py b/src/pybind/mgr/dashboard/services/ceph_service.py index 805ec6adc39..ee536ac363d 100644 --- a/src/pybind/mgr/dashboard/services/ceph_service.py +++ b/src/pybind/mgr/dashboard/services/ceph_service.py @@ -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 -- 2.39.5