From ce54dba2d3b62418fe8c23180f236241a78cac75 Mon Sep 17 00:00:00 2001 From: Hazel Smith Date: Mon, 27 Jul 2015 23:00:06 +0100 Subject: [PATCH] openstack builder: log which IP address SSH will use --- builder/openstack/ssh.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/builder/openstack/ssh.go b/builder/openstack/ssh.go index 3e7350d11..87a219b22 100644 --- a/builder/openstack/ssh.go +++ b/builder/openstack/ssh.go @@ -23,6 +23,7 @@ func CommHost( // If we have a specific interface, try that if sshinterface != "" { if addr := sshAddrFromPool(s, sshinterface); addr != "" { + log.Printf("[DEBUG] Using IP address %s from specified interface %s for SSH", addr, sshinterface) return addr, nil } } @@ -30,15 +31,18 @@ func CommHost( // If we have a floating IP, use that ip := state.Get("access_ip").(*floatingip.FloatingIP) if ip != nil && ip.IP != "" { + log.Printf("[DEBUG] Using floating IP %s for SSH", ip.IP) return ip.IP, nil } if s.AccessIPv4 != "" { + log.Printf("[DEBUG] Using AccessIPv4 %s for SSH", s.AccessIPv4) return s.AccessIPv4, nil } // Try to get it from the requested interface if addr := sshAddrFromPool(s, sshinterface); addr != "" { + log.Printf("[DEBUG] Using IP address %s for SSH", addr) return addr, nil }