]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: make execution abortion optional for command ran through run_shell()
authorRishabh Dave <ridave@redhat.com>
Wed, 20 Feb 2019 16:33:00 +0000 (22:03 +0530)
committerRishabh Dave <ridave@redhat.com>
Tue, 9 Apr 2019 15:33:31 +0000 (21:03 +0530)
Signed-off-by: Rishabh Dave <ridave@redhat.com>
qa/tasks/cephfs/mount.py
qa/tasks/vstart_runner.py

index bcc9aefd89543420a2571260d87c6f59f4c89dac..facf54984b5b6d1f17a6429c3dcee56ffb02e9a1 100644 (file)
@@ -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):
         """
index bdfc04fc3a0f732f9828c0348ecd7cff7e1b4fd1..4adc0df504d9b0d1d5b450d42e5dcc1b7a47de89 100644 (file)
@@ -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: