From: Sam Lang Date: Tue, 11 Dec 2012 16:53:57 +0000 (-1000) Subject: task/pexec: Fix when 'all' is used X-Git-Tag: 1.1.0~2386 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=081a80f89c76c8aaec7398e717a5ae5ca794f7a3;p=teuthology.git task/pexec: Fix when 'all' is used Signed-off-by: Sam Lang --- diff --git a/teuthology/task/pexec.py b/teuthology/task/pexec.py index 048986a71..b9e5670d1 100644 --- a/teuthology/task/pexec.py +++ b/teuthology/task/pexec.py @@ -51,11 +51,11 @@ def task(ctx, config): del config['sudo'] if 'all' in config and len(config) == 1: - a = config['all'] - roles = teuthology.all_roles(ctx.cluster) - config = dict((id_, a) for id_ in roles) - - with parallel() as p: - for role, ls in config.iteritems(): - (remote,) = ctx.cluster.only(role).remotes.iterkeys() - p.spawn(_exec_role, remote, role, sudo, ls) + with parallel() as p: + for remote in ctx.cluster.remotes.iterkeys(): + p.spawn(_exec_role, remote, role, sudo, ls) + else: + with parallel() as p: + for role, ls in config.iteritems(): + (remote,) = ctx.cluster.only(role).remotes.iterkeys() + p.spawn(_exec_role, remote, role, sudo, ls)