From e1874aa7ae696e093e21ce5ea942bf023e8273fe Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Fri, 30 Nov 2012 11:36:40 +0100 Subject: [PATCH] bootstrap.RunNodeSetupCmd: Add IPv6 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 224ff0f modified the node SSH setup to use the system's SSH client. Before that Paramiko was used. It's not entirely clear whehter the latter ever supported IPv6 properly, but with this patch βbootstrap.RunNodeSetupCmdβ is changed to use it if configured. The code for doing so is taken from βbootstrap.SetupNodeDaemonβ, which is going to use βbootstrap.RunNodeSetupCmdβ. Signed-off-by: Michael Hanselmann <hansmi@google.com> Reviewed-by: Guido Trotter <ultrotter@google.com> --- lib/bootstrap.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/bootstrap.py b/lib/bootstrap.py index f90929971..6ebb7c8df 100644 --- a/lib/bootstrap.py +++ b/lib/bootstrap.py @@ -288,7 +288,9 @@ def RunNodeSetupCmd(cluster_name, node, basecmd, debug, verbose, if verbose: cmd.append("--verbose") - srun = ssh.SshRunner(cluster_name) + family = ssconf.SimpleStore().GetPrimaryIPFamily() + srun = ssh.SshRunner(cluster_name, + ipv6=(family == netutils.IP6Address.family)) scmd = srun.BuildCmd(node, constants.SSH_LOGIN_USER, utils.ShellQuoteArgs(cmd), batch=False, ask_key=ask_key, quiet=False, -- GitLab