From: lisali Date: Tue, 9 Feb 2021 15:38:16 +0000 (+0800) Subject: qa: fix issues in exec_on_cleanup X-Git-Tag: v16.2.0~157^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dca5e2b59581be4ef46e44c02e719dcf2fd3ef03;p=ceph.git qa: fix issues in exec_on_cleanup Signed-off-by: Li, Xiaoyan (cherry picked from commit 898f9d69793fd0a6a779f2e4a32ad8ce5748951a) --- diff --git a/qa/tasks/exec_on_cleanup.py b/qa/tasks/exec_on_cleanup.py index a7c7ee5dae9..5a630781abb 100644 --- a/qa/tasks/exec_on_cleanup.py +++ b/qa/tasks/exec_on_cleanup.py @@ -45,17 +45,17 @@ def task(ctx, config): roles = teuthology.all_roles(ctx.cluster) config = dict((id_, a) for id_ in roles) - for role, ls in config.items(): - (remote,) = ctx.cluster.only(role).remotes.keys() - log.info('Running commands on role %s host %s', role, remote.name) - for c in ls: - c.replace('$TESTDIR', testdir) - remote.run( - args=[ - 'sudo', - 'TESTDIR={tdir}'.format(tdir=testdir), - 'bash', - '-c', - c], - ) + for role, ls in config.items(): + (remote,) = ctx.cluster.only(role).remotes.keys() + log.info('Running commands on role %s host %s', role, remote.name) + for c in ls: + c.replace('$TESTDIR', testdir) + remote.run( + args=[ + 'sudo', + 'TESTDIR={tdir}'.format(tdir=testdir), + 'bash', + '-c', + c], + )