From: Kotresh HR Date: Sat, 30 Jul 2022 00:02:27 +0000 (+0530) Subject: qa: Fix use of the 'sudo' args X-Git-Tag: v17.2.4~115^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F47368%2Fhead;p=ceph.git qa: Fix use of the 'sudo' args https://tracker.ceph.com/issues/56727 Signed-off-by: Kotresh HR (cherry picked from commit 5a33f7e6f6c1fbaa5078983ca2f0901296b65588) --- diff --git a/qa/tasks/cephfs/test_volumes.py b/qa/tasks/cephfs/test_volumes.py index c7063e1973b5..899ad632eefa 100644 --- a/qa/tasks/cephfs/test_volumes.py +++ b/qa/tasks/cephfs/test_volumes.py @@ -7191,7 +7191,7 @@ class TestMisc(TestVolumesHelper): # emulate a old-fashioned subvolume in the default group createpath1 = os.path.join(".", "volumes", "_nogroup", subvol1) - self.mount_a.run_shell(['mkdir', '-p', createpath1], sudo=True) + self.mount_a.run_shell(['sudo', 'mkdir', '-p', createpath1], omit_sudo=False) # add required xattrs to subvolume default_pool = self.mount_a.getfattr(".", "ceph.dir.layout.pool") @@ -7203,7 +7203,7 @@ class TestMisc(TestVolumesHelper): # Create malicious .meta file in legacy subvolume root. Copy v2 subvolume # .meta into legacy subvol1's root subvol2_metapath = os.path.join(".", "volumes", "_nogroup", subvol2, ".meta") - self.mount_a.run_shell(["cp", subvol2_metapath, createpath1], sudo=True) + self.mount_a.run_shell(['sudo', 'cp', subvol2_metapath, createpath1], omit_sudo=False) # Upgrade legacy subvol1 to v1 subvolpath1 = self._fs_cmd("subvolume", "getpath", self.volname, subvol1) @@ -7245,7 +7245,7 @@ class TestMisc(TestVolumesHelper): # emulate a old-fashioned subvolume -- in a custom group createpath = os.path.join(".", "volumes", group, subvol) - self.mount_a.run_shell(['mkdir', '-p', createpath], sudo=True) + self.mount_a.run_shell(['sudo', 'mkdir', '-p', createpath], omit_sudo=False) # add required xattrs to subvolume default_pool = self.mount_a.getfattr(".", "ceph.dir.layout.pool") @@ -7288,7 +7288,7 @@ class TestMisc(TestVolumesHelper): # emulate a old-fashioned subvolume -- in a custom group createpath = os.path.join(".", "volumes", group, subvol) - self.mount_a.run_shell(['mkdir', '-p', createpath], sudo=True) + self.mount_a.run_shell(['sudo', 'mkdir', '-p', createpath], omit_sudo=False) # add required xattrs to subvolume default_pool = self.mount_a.getfattr(".", "ceph.dir.layout.pool")