From 57c28376a60e4d2a67ff980fc1af5a3151407aad Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Mon, 11 Dec 2023 10:25:36 -0500 Subject: [PATCH] Port one final Ceph function to read_many --- daemon-common/ceph.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/daemon-common/ceph.py b/daemon-common/ceph.py index 1888b56e..d4d906c6 100644 --- a/daemon-common/ceph.py +++ b/daemon-common/ceph.py @@ -320,13 +320,18 @@ def get_list_osd(zkhandler, limit=None, is_fuzzy=True): # def getPoolInformation(zkhandler, pool): # Parse the stats data - pool_stats_raw = zkhandler.read(("pool.stats", pool)) + (pool_stats_raw, tier, pgs,) = zkhandler.read_many( + [ + ("pool.stats", pool), + ("pool.tier", pool), + ("pool.pgs", pool), + ] + ) + pool_stats = dict(json.loads(pool_stats_raw)) volume_count = len(getCephVolumes(zkhandler, pool)) - tier = zkhandler.read(("pool.tier", pool)) if tier is None: tier = "default" - pgs = zkhandler.read(("pool.pgs", pool)) pool_information = { "name": pool,