You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whirr.apache.org by as...@apache.org on 2012/05/13 20:03:18 UTC
svn commit: r1337953 - in /whirr/trunk: CHANGES.txt
core/src/main/java/org/apache/whirr/compute/StartupProcess.java
services/solr/
Author: asavu
Date: Sun May 13 18:03:17 2012
New Revision: 1337953
URL: http://svn.apache.org/viewvc?rev=1337953&view=rev
Log:
WHIRR-590. ssh port timeout fails the whole cluster (Doug Daniels via asavu)
Modified:
whirr/trunk/CHANGES.txt
whirr/trunk/core/src/main/java/org/apache/whirr/compute/StartupProcess.java
whirr/trunk/services/solr/ (props changed)
Modified: whirr/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/whirr/trunk/CHANGES.txt?rev=1337953&r1=1337952&r2=1337953&view=diff
==============================================================================
--- whirr/trunk/CHANGES.txt (original)
+++ whirr/trunk/CHANGES.txt Sun May 13 18:03:17 2012
@@ -119,6 +119,8 @@ Trunk (unreleased changes)
WHIRR-494. Update the BYON cluster controller to support all the operations the
regular controller supports (Cosmin Dumitrache via asavu)
+ WHIRR-590. ssh port timeout fails the whole cluster (Doug Daniels via asavu)
+
Release 0.7.1 - 2012-02-23
IMPROVEMENTS
Modified: whirr/trunk/core/src/main/java/org/apache/whirr/compute/StartupProcess.java
URL: http://svn.apache.org/viewvc/whirr/trunk/core/src/main/java/org/apache/whirr/compute/StartupProcess.java?rev=1337953&r1=1337952&r2=1337953&view=diff
==============================================================================
--- whirr/trunk/core/src/main/java/org/apache/whirr/compute/StartupProcess.java (original)
+++ whirr/trunk/core/src/main/java/org/apache/whirr/compute/StartupProcess.java Sun May 13 18:03:17 2012
@@ -134,15 +134,30 @@ public class StartupProcess implements C
Throwable th = e.getCause();
if (th instanceof RunNodesException) {
RunNodesException rnex = (RunNodesException) th;
- successfulNodes.addAll(rnex.getSuccessfulNodes());
- lostNodes.putAll(rnex.getNodeErrors());
+ addSuccessAndLostNodes(rnex);
} else {
LOG.error("Unexpected error while starting " + numberOfNodes + " nodes, minimum "
+ minNumberOfNodes + " nodes for " + roles + " of cluster " + clusterName, e);
}
}
}
-
+
+ void addSuccessAndLostNodes(RunNodesException rnex) {
+ // workaround https://code.google.com/p/jclouds/issues/detail?id=923
+ // by ensuring that any nodes in the "NodeErrors" do not get considered
+ // successful
+ Set<? extends NodeMetadata> reportedSuccessfulNodes = rnex.getSuccessfulNodes();
+ Map<? extends NodeMetadata, ? extends Throwable> errorNodesMap = rnex.getNodeErrors();
+ Set<? extends NodeMetadata> errorNodes = errorNodesMap.keySet();
+
+ // "actual" successful nodes are ones that don't appear in the errorNodes
+ Set<? extends NodeMetadata> actualSuccessfulNodes =
+ Sets.difference(reportedSuccessfulNodes, errorNodes);
+
+ successfulNodes.addAll(actualSuccessfulNodes);
+ lostNodes.putAll(errorNodesMap);
+ }
+
void cleanupFailedNodes() throws InterruptedException {
if (lostNodes.size() > 0) {
Set<String> lostIds = Sets.newLinkedHashSet();
Propchange: whirr/trunk/services/solr/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun May 13 18:03:17 2012
@@ -0,0 +1 @@
+target