From: Rishabh Dave Date: Tue, 13 Oct 2020 07:11:03 +0000 (+0530) Subject: vstart_runner: make "shell" a default argument X-Git-Tag: v17.1.0~2514^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=391e5b19fc65e5b91d8e47771ce2c994f68cfcd7;p=ceph.git vstart_runner: make "shell" a default argument 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 --- diff --git a/qa/tasks/vstart_runner.py b/qa/tasks/vstart_runner.py index f0c4006261f8..f0bc0b8a50d6 100644 --- a/qa/tasks/vstart_runner.py +++ b/qa/tasks/vstart_runner.py @@ -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',