From: Warren Usui Date: Tue, 7 Jan 2014 22:22:57 +0000 (-0800) Subject: Fix a bug where ctx.config['targets'] was looped through again X-Git-Tag: 1.1.0~1699^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f32adf055accff2ddcc7be92ace63f70cc0de1e6;p=teuthology.git Fix a bug where ctx.config['targets'] was looped through again in connect(). The bug caused vm behavior to happen for a target if any of the machines in the cluster was a vm. The code was also changed to set the key to none only if rsa or dsa keys were used on a vm. Fixes: 7113 Signed-off-by: Warren Usui --- diff --git a/teuthology/task/internal.py b/teuthology/task/internal.py index 230971a2e..a0e220d59 100644 --- a/teuthology/task/internal.py +++ b/teuthology/task/internal.py @@ -189,10 +189,9 @@ def connect(ctx, config): key = None except (AttributeError, KeyError): pass - for machine in ctx.config['targets'].iterkeys(): - if teuthology.is_vm(machine): + if key.startswith('ssh-rsa ') or key.startswith('ssh-dss '): + if teuthology.is_vm(t): key = None - break remotes.append( remote.Remote(name=t, ssh=connection.connect(user_at_host=t,