]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/vstart_runner: remove the stdin str type check
authorXiubo Li <xiubli@redhat.com>
Thu, 23 Apr 2020 11:39:31 +0000 (07:39 -0400)
committerXiubo Li <xiubli@redhat.com>
Sat, 25 Apr 2020 10:21:54 +0000 (06:21 -0400)
For the "ceph-dencoder" it will use the byte type data.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
qa/tasks/cephfs/filesystem.py
qa/tasks/vstart_runner.py

index 1398fb5060e49dff9ccf46e1d4f0c1f068bfc2b6..60877ed63a4f5fd5202b0fdd7599593d307cdaca 100644 (file)
@@ -1094,7 +1094,7 @@ class Filesystem(MDSCluster):
             os.path.join(self._prefix, "rados"), "-p", pool, "getxattr", obj_name, xattr_name
         ]
         try:
-            proc = remote.run(args=args, stdout=StringIO())
+            proc = remote.run(args=args, stdout=BytesIO())
         except CommandFailedError as e:
             log.error(e.__str__())
             raise ObjectNotFound(obj_name)
index d6a69066255e6e3b0654591e66316ec0c46aae0d..6e4403c6ef5b747175eb5a58d8bcb08d3bc1d526 100644 (file)
@@ -390,12 +390,12 @@ class LocalRemote(object):
                                        env=env)
 
         if stdin:
-            if not isinstance(stdin, str):
-                raise RuntimeError("Can't handle non-string stdins on a vstart cluster")
-
             # Hack: writing to stdin is not deadlock-safe, but it "always" works
             # as long as the input buffer is "small"
-            subproc.stdin.write(stdin.encode())
+            if isinstance(stdin, str):
+                subproc.stdin.write(stdin.encode())
+            else:
+                subproc.stdin.write(stdin)
 
         proc = LocalRemoteProcess(
             args, subproc, check_status,