From: Rishabh Dave Date: Wed, 20 Feb 2019 16:33:00 +0000 (+0530) Subject: qa: make execution abortion optional for command ran through run_shell() X-Git-Tag: v14.2.10~199^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c86b2ed77143b18bf02ea5f0ac8322f958aa8595;p=ceph.git qa: make execution abortion optional for command ran through run_shell() Signed-off-by: Rishabh Dave (cherry picked from commit 5df2b82c4f9ce71cd82889531333be184c84707c) --- diff --git a/qa/tasks/cephfs/mount.py b/qa/tasks/cephfs/mount.py index 8d07323d859e..c3d58c86180c 100644 --- a/qa/tasks/cephfs/mount.py +++ b/qa/tasks/cephfs/mount.py @@ -155,10 +155,11 @@ class CephFSMount(object): p.wait() return p.stdout.getvalue().strip() - def run_shell(self, args, wait=True): + def run_shell(self, args, wait=True, check_status=True): args = ["cd", self.mountpoint, run.Raw('&&'), "sudo"] + args return self.client_remote.run(args=args, stdout=StringIO(), - stderr=StringIO(), wait=wait) + stderr=StringIO(), wait=wait, + check_status=check_status) def open_no_data(self, basename): """ diff --git a/qa/tasks/vstart_runner.py b/qa/tasks/vstart_runner.py index 74b26d23df46..0d2247ccbdb7 100644 --- a/qa/tasks/vstart_runner.py +++ b/qa/tasks/vstart_runner.py @@ -418,13 +418,12 @@ class LocalFuseMount(FuseMount): # to avoid assumptions about daemons' pwd return os.path.abspath("./client.{0}.keyring".format(self.client_id)) - def run_shell(self, args, wait=True): + def run_shell(self, args, wait=True, check_status=True): # FIXME maybe should add a pwd arg to teuthology.orchestra so that # the "cd foo && bar" shenanigans isn't needed to begin with and # then we wouldn't have to special case this - return self.client_remote.run( - args, wait=wait, cwd=self.mountpoint - ) + return self.client_remote.run(args, wait=wait, cwd=self.mountpoint, + check_status=check_status) def setupfs(self, name=None): if name is None and self.fs is not None: