From dca5e2b59581be4ef46e44c02e719dcf2fd3ef03 Mon Sep 17 00:00:00 2001 From: lisali Date: Tue, 9 Feb 2021 23:38:16 +0800 Subject: [PATCH] qa: fix issues in exec_on_cleanup Signed-off-by: Li, Xiaoyan (cherry picked from commit 898f9d69793fd0a6a779f2e4a32ad8ce5748951a) --- qa/tasks/exec_on_cleanup.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/qa/tasks/exec_on_cleanup.py b/qa/tasks/exec_on_cleanup.py index a7c7ee5dae92..5a630781abb1 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], + ) -- 2.47.3