]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Fix a bug where ctx.config['targets'] was looped through again 172/head
authorWarren Usui <warren.usui@inktank.com>
Tue, 7 Jan 2014 22:22:57 +0000 (14:22 -0800)
committerWarren Usui <warren.usui@inktank.com>
Tue, 7 Jan 2014 22:22:57 +0000 (14:22 -0800)
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 <warren.usui@inktank.com>
teuthology/task/internal.py

index 230971a2eb35b9becb2f9fa8622b4b15363b401d..a0e220d59884a16b43e1862ae593544f9e37375d 100644 (file)
@@ -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,