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: v17.1.0~2221^2~12 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=08039576950697e7b9dd55c6e44068440d2a1553;p=ceph-ci.git qa/tasks/cephadm: shell: take 'all-roles' or 'all-hosts' 'all' is ambiguous Signed-off-by: Sage Weil --- 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()