From: Patrick Donnelly Date: Wed, 24 Apr 2024 20:14:31 +0000 (-0400) Subject: qa: translate empty output from rank_tell to empty dict X-Git-Tag: v20.0.0~2039^2~4 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f5433792ecb0d08cc4a845336b50651bc6909f4a;p=ceph.git qa: translate empty output from rank_tell to empty dict Not all commands return JSON, like `dirfrag split`. Signed-off-by: Patrick Donnelly --- diff --git a/qa/tasks/cephfs/filesystem.py b/qa/tasks/cephfs/filesystem.py index 97c87da6e8ab1..20725f1198bbc 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))