]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/cephadm: shell: take 'all-roles' or 'all-hosts'
authorSage Weil <sage@newdream.net>
Tue, 13 Apr 2021 14:58:09 +0000 (10:58 -0400)
committerSage Weil <sage@newdream.net>
Fri, 16 Apr 2021 12:36:47 +0000 (07:36 -0500)
'all' is ambiguous

Signed-off-by: Sage Weil <sage@newdream.net>
qa/tasks/cephadm.py

index 033a41e23e2bc00bf6722715ae585eea238764fb..b7af10ed49e96308240d3eaa28a64cabd02ddb59 100644 (file)
@@ -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()