Skip to content
Permalink
Browse files
FIXED JENKINS-19943 but credit should go to Nathan Kinder
  • Loading branch information
Jens Brejner committed Jan 31, 2014
1 parent 210e69a commit b469410a8245f05bfb4bbc96b243ac54e5bc1ecb
Showing 1 changed file with 3 additions and 4 deletions.
@@ -220,10 +220,9 @@ private Connection connectToSsh(EC2Computer computer, PrintStream logger) throws
if (computer.getNode().usePrivateDnsName) {
host = instance.getPrivateDnsName();
} else {
/* VPC hosts don't have public DNS names, so we need to use an IP address instead */
if (vpc_id == null || vpc_id.equals("")) {
host = instance.getPublicDnsName();
} else {
host = instance.getPublicDnsName();
// If we fail to get a public DNS name, use the private IP.
if (host == null || host.equals("")) {
host = instance.getPrivateIpAddress();
}
}

0 comments on commit b469410

Please sign in to comment.