Skip to content
Permalink
Browse files
Merge pull request #110 from stevedenman/master
JENKINS-19943 Fix connection to Windows slaves outside us-east-1.
  • Loading branch information
francisu committed Sep 23, 2014
2 parents 7fe8fdf + 00cfb67 commit b99f8191e990a03d3f8c8a9887062f2ed8c34883
Showing 1 changed file with 6 additions and 8 deletions.
@@ -95,16 +95,14 @@ private WinConnection connectToWinRM(EC2Computer computer, PrintStream logger) t
host = instance.getPrivateDnsName();
ip = instance.getPrivateIpAddress(); // SmbFile doesn't quite work with hostnames
} 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();
if (host == null || host.equals("")) {
host = instance.getPrivateDnsName();
ip = instance.getPrivateIpAddress(); // SmbFile doesn't quite work with hostnames
}
else {
host = instance.getPublicDnsName();
ip = instance.getPublicIpAddress(); // SmbFile doesn't quite work with hostnames
} else {
host = instance.getPrivateDnsName();
ip = instance.getPrivateIpAddress();
}
}

0 comments on commit b99f819

Please sign in to comment.