From f5433792ecb0d08cc4a845336b50651bc6909f4a Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Wed, 24 Apr 2024 16:14:31 -0400 Subject: [PATCH] qa: translate empty output from rank_tell to empty dict Not all commands return JSON, like `dirfrag split`. Signed-off-by: Patrick Donnelly --- qa/tasks/cephfs/filesystem.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qa/tasks/cephfs/filesystem.py b/qa/tasks/cephfs/filesystem.py index 97c87da6e8a..20725f1198b 100644 --- a/qa/tasks/cephfs/filesystem.py +++ b/qa/tasks/cephfs/filesystem.py @@ -1354,6 +1354,9 @@ class Filesystem(MDSCluster): kwargs.pop('status', None) # not useful try: out = self.get_ceph_cmd_stdout("tell", f"mds.{mds_id}", *args, **kwargs) + out = out.strip() + if len(out) == 0: + return {} return json.loads(out) except json.decoder.JSONDecodeError: log.error("could not decode: {}".format(out)) -- 2.47.3