Skip to content
Permalink
Browse files
Merge pull request #77 from jbrejner/master
FIXED JENKINS-19943 but credit should go to Nathan Kinder
  • Loading branch information
francisu committed Jan 31, 2014
2 parents 6e994e0 + b469410 commit f9b87476e96f322b19683743db4ee6bb5d07522c
Showing 1 changed file with 3 additions and 4 deletions.
@@ -222,10 +222,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 f9b8747

Please sign in to comment.