]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: translate empty output from rank_tell to empty dict
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 24 Apr 2024 20:14:31 +0000 (16:14 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 1 May 2024 13:30:48 +0000 (09:30 -0400)
Not all commands return JSON, like `dirfrag split`.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit f5433792ecb0d08cc4a845336b50651bc6909f4a)

qa/tasks/cephfs/filesystem.py

index 3f8d9b067d4e0d9f245789cfc33745bd08d3e512..bd416abcd8d3649725383be327caf619d67f62d4 100644 (file)
@@ -1317,6 +1317,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))