From 8bf935beb88fa329ba084704a58f4e846c52432e Mon Sep 17 00:00:00 2001 From: Ian Delahorne Date: Sun, 15 Jun 2014 02:12:52 -0500 Subject: [PATCH] Force IPv4 addresses from address pools in Openstack. Fixes #1258 Rackspace defaults to a public IPv4 and IPv6 address. These are returned in random order, with the sprintf further on generating an incorrect connection string if on IPv6. Force IPv4 until support for correct connection strings and a configuration flag for logging in over IPv6 is added. --- builder/openstack/ssh.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/openstack/ssh.go b/builder/openstack/ssh.go index bdb3d75d6..44cd70041 100644 --- a/builder/openstack/ssh.go +++ b/builder/openstack/ssh.go @@ -26,7 +26,7 @@ func SSHAddress(csp gophercloud.CloudServersProvider, port int) func(multistep.S for pool, addresses := range ip_pools { if pool != "" { for _, address := range addresses { - if address.Addr != "" { + if address.Addr != "" && address.Version == 4 { return fmt.Sprintf("%s:%d", address.Addr, port), nil } }