From a969d4fe426dc6466e61b8e2580d457b4f135ab1 Mon Sep 17 00:00:00 2001 From: Adam King Date: Thu, 17 Nov 2022 13:14:55 -0500 Subject: [PATCH] mgr/orchestrator: fix device size in `orch device ls` output Fixes: https://tracker.ceph.com/issues/58045 Signed-off-by: Adam King (cherry picked from commit 7e576185ac87877e4d626c09bdef34e194042778) --- src/pybind/mgr/orchestrator/module.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pybind/mgr/orchestrator/module.py b/src/pybind/mgr/orchestrator/module.py index 73bd137484db6..448474435533b 100644 --- a/src/pybind/mgr/orchestrator/module.py +++ b/src/pybind/mgr/orchestrator/module.py @@ -20,7 +20,7 @@ from ceph.deployment.service_spec import PlacementSpec, ServiceSpec, service_spe from ceph.deployment.hostspec import SpecValidationError from ceph.utils import datetime_now -from mgr_util import to_pretty_timedelta, format_dimless, format_bytes +from mgr_util import to_pretty_timedelta, format_bytes from mgr_module import MgrModule, HandleCommandResult, Option from object_format import Format @@ -536,7 +536,7 @@ class OrchestratorCli(OrchestratorClientMixin, MgrModule, d.lsm_data.get('transport', ''), d.lsm_data.get('rpm', ''), d.device_id, - format_dimless(d.sys_api.get('size', 0), 5), + format_bytes(d.sys_api.get('size', 0), 5), d.lsm_data.get('health', ''), display_map[led_ident], display_map[led_fail], @@ -552,7 +552,7 @@ class OrchestratorCli(OrchestratorClientMixin, MgrModule, d.path, d.human_readable_type, d.device_id, - format_dimless(d.sys_api.get('size', 0), 5), + format_bytes(d.sys_api.get('size', 0), 5), display_map[d.available], nice_delta(now, d.created, ' ago'), ', '.join(d.rejected_reasons) -- 2.39.5