]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pacific: qa: avoid sudo on tmpfile 42166/head
authorPatrick Donnelly <pdonnell@redhat.com>
Mon, 12 Jul 2021 15:18:27 +0000 (08:18 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 16 Jul 2021 16:53:30 +0000 (09:53 -0700)
This code does not exist in master. This is a continuation of the fix
for the backport. Resolves failures like [1].

[1] /ceph/teuthology-archive/yuriw-2021-07-08_23:33:26-fs-wip-yuri2-testing-2021-07-08-1142-pacific-distro-basic-smithi/6260232/teuthology.log

Fixes: https://tracker.ceph.com/issues/51704
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
qa/tasks/cephfs/cephfs_test_case.py

index 9ef7989d9468d67a6631c1be088a09e9f2be0a0c..40af40625498fc22e835e6a116867293bbaa19c3 100644 (file)
@@ -4,12 +4,10 @@ import os
 import re
 
 from shlex import split as shlex_split
-from io import StringIO
 
 from tasks.ceph_test_case import CephTestCase
 
 from teuthology import contextutil
-from teuthology.misc import sudo_write_file
 from teuthology.orchestra import run
 from teuthology.orchestra.run import CommandFailedError
 
@@ -445,9 +443,7 @@ class CephFSTestCase(CephTestCase):
         return self.run_cluster_cmd(f'auth get {self.client_name}')
 
     def create_keyring_file(self, remote, keyring):
-        keyring_path = remote.run(args=['mktemp'], stdout=StringIO()).\
-            stdout.getvalue().strip()
-        sudo_write_file(remote, keyring_path, keyring)
+        keyring_path = remote.mktemp(data=keyring)
 
         # required when triggered using vstart_runner.py.
         remote.run(args=['chmod', '644', keyring_path])