brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [23/27] incubator-brooklyn git commit: Fix regressions
Date Fri, 29 May 2015 17:22:16 GMT
Fix regressions


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/7eb31fe3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/7eb31fe3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/7eb31fe3

Branch: refs/heads/master
Commit: 7eb31fe33566c9b24baed979df345b0e407a29ba
Parents: 9c37f24
Author: Richard Downer <richard@apache.org>
Authored: Thu May 28 17:23:48 2015 +0100
Committer: Richard Downer <richard@apache.org>
Committed: Thu May 28 17:40:46 2015 +0100

----------------------------------------------------------------------
 .../location/jclouds/JcloudsWinRmMachineLocation.java     | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/7eb31fe3/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsWinRmMachineLocation.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsWinRmMachineLocation.java
b/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsWinRmMachineLocation.java
index 150d5ff..d555cd9 100644
--- a/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsWinRmMachineLocation.java
+++ b/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsWinRmMachineLocation.java
@@ -92,7 +92,8 @@ public class JcloudsWinRmMachineLocation extends WinRmMachineLocation implements
     
     @Override
     public String getHostname() {
-        return node.getHostname();
+        InetAddress address = getAddress();
+        return (address != null) ? address.getHostAddress() : null;
     }
     
     @Override
@@ -107,8 +108,11 @@ public class JcloudsWinRmMachineLocation extends WinRmMachineLocation
implements
 
     @Override
     public String getSubnetHostname() {
-        String publicHostname = jcloudsParent.getPublicHostname(node, Optional.<HostAndPort>absent(),
config().getBag());
-        return publicHostname;
+        // TODO: TEMP FIX: WAS:
+        // String publicHostname = jcloudsParent.getPublicHostname(node, Optional.<HostAndPort>absent(),
config().getBag());
+        // but this causes a call to JcloudsUtil.getFirstReachableAddress, which searches
for accessible SSH service.
+        // This workaround is good for public nodes but not private-subnet ones.
+        return getHostname();
     }
 
     @Override


Mime
View raw message