From 3c751fea7f48ef613286211797a7eafc4913b36e Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 18 Dec 2019 21:51:52 -0600 Subject: [PATCH] qa/tasks/cephfs: python3 Signed-off-by: Sage Weil --- qa/tasks/cephfs/kernel_mount.py | 4 ++-- qa/tasks/cephfs/mount.py | 6 +++--- qa/tasks/cephfs/test_volume_client.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/qa/tasks/cephfs/kernel_mount.py b/qa/tasks/cephfs/kernel_mount.py index 9acea3f491e4e..b90749f259934 100644 --- a/qa/tasks/cephfs/kernel_mount.py +++ b/qa/tasks/cephfs/kernel_mount.py @@ -209,7 +209,7 @@ class KernelMount(CephFSMount): """) p = self.client_remote.run(args=[ - 'sudo', 'python', '-c', pyscript + 'sudo', 'python3', '-c', pyscript ], stdout=StringIO(), timeout=(5*60)) client_id_to_dir = json.loads(p.stdout.getvalue()) @@ -231,7 +231,7 @@ class KernelMount(CephFSMount): """).format(debug_dir=debug_dir, filename=filename) p = self.client_remote.run(args=[ - 'sudo', 'python', '-c', pyscript + 'sudo', 'python3', '-c', pyscript ], stdout=StringIO(), timeout=(5*60)) return p.stdout.getvalue() diff --git a/qa/tasks/cephfs/mount.py b/qa/tasks/cephfs/mount.py index e8f1af8ed4576..fe7186fb57d53 100644 --- a/qa/tasks/cephfs/mount.py +++ b/qa/tasks/cephfs/mount.py @@ -180,13 +180,13 @@ class CephFSMount(object): 'sudo', 'rm', '-f', os.path.join(self.mountpoint, filename) ]) - def _run_python(self, pyscript, py_version='python'): + def _run_python(self, pyscript, py_version='python3'): return self.client_remote.run( args=['sudo', 'adjust-ulimits', 'daemon-helper', 'kill', py_version, '-c', pyscript], wait=False, stdin=run.PIPE, stdout=StringIO()) - def run_python(self, pyscript, py_version='python'): + def run_python(self, pyscript, py_version='python3'): p = self._run_python(pyscript, py_version) p.wait() return p.stdout.getvalue().strip() @@ -377,7 +377,7 @@ class CephFSMount(object): log.info("check lock on file {0}".format(basename)) self.client_remote.run(args=[ - 'sudo', 'python', '-c', pyscript + 'sudo', 'python3', '-c', pyscript ]) def write_background(self, basename="background_file", loop=False): diff --git a/qa/tasks/cephfs/test_volume_client.py b/qa/tasks/cephfs/test_volume_client.py index 0c59225dfc769..a6b4d10afb8b7 100644 --- a/qa/tasks/cephfs/test_volume_client.py +++ b/qa/tasks/cephfs/test_volume_client.py @@ -19,7 +19,7 @@ class TestVolumeClient(CephFSTestCase): def setUp(self): CephFSTestCase.setUp(self) self.py_version = self.ctx.config.get('overrides', {}).\ - get('python', TestVolumeClient.default_py_version) + get('python3', TestVolumeClient.default_py_version) log.info("using python version: {python_version}".format( python_version=self.py_version )) -- 2.39.5