From cea8832f9003441ca16d5ae3e6b80431ceec6df7 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 29 Apr 2022 16:50:30 -0400 Subject: [PATCH] Ensure initial OSD stats is populated Values are all invalid but this ensures the client won't error out when trying to show an OSD that has never checked in yet. --- node-daemon/pvcnoded/objects/CephInstance.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/node-daemon/pvcnoded/objects/CephInstance.py b/node-daemon/pvcnoded/objects/CephInstance.py index 70061a0c..5c9f5103 100644 --- a/node-daemon/pvcnoded/objects/CephInstance.py +++ b/node-daemon/pvcnoded/objects/CephInstance.py @@ -297,7 +297,10 @@ class CephOSDInstance(object): (("osd.node", osd_id), node), (("osd.device", osd_id), device), (("osd.db_device", osd_id), db_device), - (("osd.stats", osd_id), "{}"), + ( + ("osd.stats", osd_id), + f'{"uuid": "|", "up": 0, "in": 0, "primary_affinity": "|", "utilization": "|", "var": "|", "pgs": "|", "kb": "|", "weight": "|", "reweight": "|", "node": "{node}", "used": "|", "avail": "|", "wr_ops": "|", "wr_data": "|", "rd_ops": "|", "rd_data": "|", state="|" }', + ), ] )