Commit ce54dba2 authored by Hazel Smith's avatar Hazel Smith

openstack builder: log which IP address SSH will use

parent cd9e352b
...@@ -23,6 +23,7 @@ func CommHost( ...@@ -23,6 +23,7 @@ func CommHost(
// If we have a specific interface, try that // If we have a specific interface, try that
if sshinterface != "" { if sshinterface != "" {
if addr := sshAddrFromPool(s, sshinterface); addr != "" { if addr := sshAddrFromPool(s, sshinterface); addr != "" {
log.Printf("[DEBUG] Using IP address %s from specified interface %s for SSH", addr, sshinterface)
return addr, nil return addr, nil
} }
} }
...@@ -30,15 +31,18 @@ func CommHost( ...@@ -30,15 +31,18 @@ func CommHost(
// If we have a floating IP, use that // If we have a floating IP, use that
ip := state.Get("access_ip").(*floatingip.FloatingIP) ip := state.Get("access_ip").(*floatingip.FloatingIP)
if ip != nil && ip.IP != "" { if ip != nil && ip.IP != "" {
log.Printf("[DEBUG] Using floating IP %s for SSH", ip.IP)
return ip.IP, nil return ip.IP, nil
} }
if s.AccessIPv4 != "" { if s.AccessIPv4 != "" {
log.Printf("[DEBUG] Using AccessIPv4 %s for SSH", s.AccessIPv4)
return s.AccessIPv4, nil return s.AccessIPv4, nil
} }
// Try to get it from the requested interface // Try to get it from the requested interface
if addr := sshAddrFromPool(s, sshinterface); addr != "" { if addr := sshAddrFromPool(s, sshinterface); addr != "" {
log.Printf("[DEBUG] Using IP address %s for SSH", addr)
return addr, nil return addr, nil
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment