From 75135f6d5f9e891af218a2fb8881700fbce37b3a Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 3 Nov 2023 23:54:10 -0400 Subject: [PATCH] Avoid broken output format for new OSDs --- client-cli/pvc/lib/storage.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client-cli/pvc/lib/storage.py b/client-cli/pvc/lib/storage.py index 9075c64b..4f78403b 100644 --- a/client-cli/pvc/lib/storage.py +++ b/client-cli/pvc/lib/storage.py @@ -457,7 +457,10 @@ def format_list_osd(config, osd_list): osd_information["device"] = f"{osd_information['device']} *s" # Deal with the size to human readable - osd_information["stats"]["size"] = osd_information["stats"]["kb"] * 1024 + if isinstance(osd_information["stats"]["kb"], int): + osd_information["stats"]["size"] = osd_information["stats"]["kb"] * 1024 + else: + osd_information["stats"]["size"] = "N/A" for datatype in "size", "wr_data", "rd_data": databytes = osd_information["stats"][datatype] if isinstance(databytes, int):