]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
vstart_runner: make "shell" a default argument
authorRishabh Dave <ridave@redhat.com>
Tue, 13 Oct 2020 07:11:03 +0000 (12:41 +0530)
committerRishabh Dave <ridave@redhat.com>
Fri, 12 Mar 2021 03:31:58 +0000 (09:01 +0530)
Add "shell" as a parameter for LocalRemoteProcess._do_run() and set its
default value to True. This is necessary to align the interface that
executes the commands for the teuthology and for vstart_runner.py which
reduces compatibility bugs between vstart_runner and teuthology for
tests.

Also, update the part where LocalRemote._do_run() sets shell to True
based on whether or not list contains an instance of class Raw.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
qa/tasks/vstart_runner.py

index f0c4006261f80d37a5b37ef22256a24e8488a1fe..f0bc0b8a50d6c7d06a76004ec951348bffb1b9dd 100644 (file)
@@ -406,11 +406,12 @@ class LocalRemote(object):
     # vstart_runner.py.
     def _do_run(self, args, check_status=True, wait=True, stdout=None,
                 stderr=None, cwd=None, stdin=None, logger=None, label=None,
-                env=None, timeout=None, omit_sudo=True):
+                env=None, timeout=None, omit_sudo=True, shell=True):
         args = self._perform_checks_and_return_list_of_args(args, omit_sudo)
 
         # We have to use shell=True if any run.Raw was present, e.g. &&
-        shell = any([a for a in args if isinstance(a, Raw)])
+        if not shell:
+            shell = any([a for a in args if isinstance(a, Raw)])
 
         # Filter out helper tools that don't exist in a vstart environment
         args = [a for a in args if a not in ('adjust-ulimits',