Github user sjcorbett commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/949#discussion_r169910351
--- Diff:
locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/DefaultConnectivityResolver.java
---
@@ -342,7 +343,12 @@ void publishNetworks(NodeMetadata node, Entity entity)
{
protected Iterable<HostAndPort> getReachableAddresses(NodeMetadata
node, Predicate<? super HostAndPort> reachablePredicate, Duration timeout) {
if (timeout == null) timeout = Duration.FIVE_MINUTES;
Iterable<String> candidates = getResolvableAddressesWithMode(node);
- return JcloudsUtil.getReachableAddresses(candidates,
node.getLoginPort(), timeout, reachablePredicate);
+ Iterable<HostAndPort> result =
JcloudsUtil.getReachableAddresses(candidates, node.getLoginPort(), timeout,
reachablePredicate);
+ if
(FluentIterable.from(result).filter(Predicates.equalTo(Optional.absent())).isEmpty())
{
+ LOG.error("None of the addresses {} of node {} are reachable
in mode {}", new Object[]{Iterables.toString(candidates), node,
getNetworkMode()});
+ throw new IllegalStateException("Could not find any reachable
address for node: " + node + " in mode: " + getNetworkMode());
--- End diff --
Why not change the existing message on line 215?
---