From: Sage Weil Date: Tue, 13 Apr 2021 14:58:09 +0000 (-0400) Subject: qa/tasks/cephadm: shell: take 'all-roles' or 'all-hosts' X-Git-Tag: v16.2.2~1^2~14 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8e045724ef5e27f0477a27a3ee36dd9e5587d28f;p=ceph.git qa/tasks/cephadm: shell: take 'all-roles' or 'all-hosts' 'all' is ambiguous Signed-off-by: Sage Weil (cherry picked from commit 08039576950697e7b9dd55c6e44068440d2a1553) --- diff --git a/qa/tasks/cephadm.py b/qa/tasks/cephadm.py index 033a41e23e2..b7af10ed49e 100644 --- a/qa/tasks/cephadm.py +++ b/qa/tasks/cephadm.py @@ -943,10 +943,14 @@ def shell(ctx, config): env.extend(['-e', k + '=' + ctx.config.get(k, '')]) del config['env'] - if 'all' in config and len(config) == 1: - a = config['all'] + if 'all-roles' in config and len(config) == 1: + a = config['all-roles'] roles = teuthology.all_roles(ctx.cluster) - config = dict((id_, a) for id_ in roles) + config = dict((id_, a) for id_ in roles if not id_.startswith('host.')) + elif 'all-hosts' in config and len(config) == 1: + a = config['all-hosts'] + roles = teuthology.all_roles(ctx.cluster) + config = dict((id_, a) for id_ in roles if id_.startswith('host.')) for role, cmd in config.items(): (remote,) = ctx.cluster.only(role).remotes.keys()