From: Guillaume Abrioux Date: Wed, 22 Sep 2021 07:35:54 +0000 (+0200) Subject: cephadm: fix osd size reported in 'orch ls' X-Git-Tag: v16.2.7~67^2~31 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0609eef21b45bb8e05ba7bc80b8892cd824ff783;p=ceph.git cephadm: fix osd size reported in 'orch ls' The current code enforces ('running osds' + 1), see [1]. Let's simply print the number of running osds instead of a meaningless calculation. [1] https://github.com/ceph/ceph/commit/1c0a0a6f6153dc555085f263f161666cd171964a#diff-4f2fb7d330e74b64ac41457b7c7a723cd78db86433e0b0c398874531e5a7e39eR1852-R1859 Fixes: https://tracker.ceph.com/issues/50928 Signed-off-by: Guillaume Abrioux (cherry picked from commit 97219591dab8f54f239ccfb1891c45b01e7bec79) --- diff --git a/src/pybind/mgr/orchestrator/module.py b/src/pybind/mgr/orchestrator/module.py index 741c68d89938..8b194b8a00d9 100644 --- a/src/pybind/mgr/orchestrator/module.py +++ b/src/pybind/mgr/orchestrator/module.py @@ -604,10 +604,15 @@ class OrchestratorCli(OrchestratorClientMixin, MgrModule, else: refreshed = nice_delta(now, s.last_refresh, ' ago') + if s.spec.service_type == 'osd': + running = str(s.running) + else: + running = '{}/{}'.format(s.running, s.size) + table.add_row(( s.spec.service_name(), s.get_port_summary(), - '%d/%d' % (s.running, s.size), + running, refreshed, nice_delta(now, s.created), pl,