]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/ceph_manager.py: do not use python to write a file
authorSage Weil <sage@redhat.com>
Fri, 13 Dec 2019 18:42:57 +0000 (18:42 +0000)
committerSage Weil <sage@redhat.com>
Fri, 13 Dec 2019 18:44:42 +0000 (12:44 -0600)
/usr/bin/python dne on el8, /usr/bin/python3 dne on el7.  But
all we need to do is write a file--we can do that with tee.

Signed-off-by: Sage Weil <sage@redhat.com>
qa/tasks/ceph_manager.py

index 6d8bebeb07d0fb46fdfd1eb555c59595bc22e179..ebdfded6369443a948cdee953902153953a592b4 100644 (file)
@@ -58,13 +58,10 @@ def write_conf(ctx, conf_path=DEFAULT_CONF_PATH, cluster='ceph'):
         args=[
             'sudo', 'mkdir', '-p', '/etc/ceph', run.Raw('&&'),
             'sudo', 'chmod', '0755', '/etc/ceph', run.Raw('&&'),
-            'sudo', 'python',
-            '-c',
-            ('import shutil, sys; '
-             'shutil.copyfileobj(sys.stdin, file(sys.argv[1], "wb"))'),
-            conf_path,
-            run.Raw('&&'),
+            'sudo', 'tee', conf_path, run.Raw('&&'),
             'sudo', 'chmod', '0644', conf_path,
+            run.Raw('>'), '/dev/null',
+
         ],
         stdin=run.PIPE,
         wait=False)