Skip to content

Commit

Permalink
Merge pull request #77 from jbrejner/master
Browse files Browse the repository at this point in the history
FIXED JENKINS-19943 but credit should go to Nathan Kinder
  • Loading branch information
francisu committed Jan 31, 2014
2 parents 6e994e0 + b469410 commit f9b8747
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main/java/hudson/plugins/ec2/ssh/EC2UnixLauncher.java
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit f9b8747

Please sign in to comment.