From 8e045724ef5e27f0477a27a3ee36dd9e5587d28f Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 13 Apr 2021 10:58:09 -0400 Subject: [PATCH] qa/tasks/cephadm: shell: take 'all-roles' or 'all-hosts' 'all' is ambiguous Signed-off-by: Sage Weil (cherry picked from commit 08039576950697e7b9dd55c6e44068440d2a1553) --- qa/tasks/cephadm.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/qa/tasks/cephadm.py b/qa/tasks/cephadm.py index 033a41e23e2bc..b7af10ed49e96 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() -- 2.39.5