From a8d4901fe6248967455f56d4c0c62eba7842b4f8 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 11 Jul 2011 14:23:31 -0700 Subject: [PATCH] make connect work if no roles are specified This is useful for -nuke. --- teuthology/task/internal.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/teuthology/task/internal.py b/teuthology/task/internal.py index 3782792aa9234..337cf8075be65 100644 --- a/teuthology/task/internal.py +++ b/teuthology/task/internal.py @@ -97,8 +97,13 @@ def connect(ctx, config): remotes = [remote.Remote(name=t, ssh=connection.connect(t)) for t in ctx.config['targets']] ctx.cluster = orchestra.cluster.Cluster() - for rem, roles in zip(remotes, ctx.config['roles']): - ctx.cluster.add(rem, roles) + if 'roles' in ctx.config: + for rem, roles in zip(remotes, ctx.config['roles']): + ctx.cluster.add(rem, roles) + else: + for rem in remotes: + ctx.cluster.add(rem, rem.name) + def check_conflict(ctx, config): log.info('Checking for old test directory...') -- 2.39.5