Skip to content
Permalink
Browse files
JENKINS-19943 Fix connection to Windows slaves outside us-east-1.
  • Loading branch information
Steve committed Sep 15, 2014
1 parent 7fe8fdf commit 00cfb671b6f50bc28d84909927ed0b1da6776243
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 00cfb67

Please sign in to comment.