Don't attemp ipv6 ssh in case of ipv4 cluster
authorCostas Drogos <costas.drogos@gmail.com>
Thu, 3 Oct 2013 09:37:14 +0000 (12:37 +0300)
committerMichele Tartara <mtartara@google.com>
Mon, 7 Oct 2013 16:25:36 +0000 (18:25 +0200)
In case of a cluster with primary-ip-version=4, there is no need
for cluster to try ipv6 ssh connections which may timeout.
So append '-4' on ssh if cluster is ipv4-only

Signed-off-by: Costas Drogos <costas.drogos@gmail.com>
Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

lib/ssh.py

index 9d519fd..c694341 100644 (file)
@@ -183,6 +183,8 @@ class SshRunner:
 
     if self.ipv6:
       options.append("-6")
+    else:
+      options.append("-4")
 
     return options