]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_volume_client: Fix failure of test_idempotency
authorKotresh HR <khiremat@redhat.com>
Sat, 23 Jan 2021 17:03:32 +0000 (22:33 +0530)
committerKotresh HR <khiremat@redhat.com>
Fri, 5 Mar 2021 06:50:32 +0000 (12:20 +0530)
With the test environment, 'args must be encodeable
 as a bytearray' error is seen for 'ceph_mds_command'.
Hence removed tuple and passed the JSON formatted string.

Fixes: https://tracker.ceph.com/issues/48830
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit 1c6c172a9b665d6b769d67e301061dbd7b044472)

src/pybind/ceph_volume_client.py

index b748f5d85f784abf3cd2a30b7b52f17c36580bb7..3d898556dbf43f2794c8c24b3e087301a42a6d6d 100644 (file)
@@ -167,10 +167,10 @@ class RankEvicter(threading.Thread):
             ))
             ret, outb, outs = self._volume_client.fs.mds_command(
                 "%s" % self.gid,
-                [json.dumps({
+                json.dumps({
                                 "prefix": "session evict",
                                 "filters": self._client_spec
-                })], "")
+                }), "")
             log.debug("mds_command: complete {0} {1}".format(ret, outs))
 
             # If we get a clean response, great, it's gone from that rank.