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:00:50 UTC
svn commit: r1337952 - in /whirr/branches/branch-0.7: CHANGES.txt
core/src/main/java/org/apache/whirr/compute/StartupProcess.java
Author: asavu
Date: Sun May 13 18:00:50 2012
New Revision: 1337952
URL: http://svn.apache.org/viewvc?rev=1337952&view=rev
Log:
WHIRR-590. ssh port timeout fails the whole cluster (Doug Daniels via asavu)
Modified:
whirr/branches/branch-0.7/CHANGES.txt
whirr/branches/branch-0.7/core/src/main/java/org/apache/whirr/compute/StartupProcess.java
Modified: whirr/branches/branch-0.7/CHANGES.txt
URL: http://svn.apache.org/viewvc/whirr/branches/branch-0.7/CHANGES.txt?rev=1337952&r1=1337951&r2=1337952&view=diff
==============================================================================
--- whirr/branches/branch-0.7/CHANGES.txt (original)
+++ whirr/branches/branch-0.7/CHANGES.txt Sun May 13 18:00:50 2012
@@ -44,6 +44,8 @@ Release 0.7.2
WHIRR-572. Ensure ZooKeeper data directories are created. (tomwhite)
+ WHIRR-590. ssh port timeout fails the whole cluster (Doug Daniels via asavu)
+
Release 0.7.1 - 2012-02-23
IMPROVEMENTS
Modified: whirr/branches/branch-0.7/core/src/main/java/org/apache/whirr/compute/StartupProcess.java
URL: http://svn.apache.org/viewvc/whirr/branches/branch-0.7/core/src/main/java/org/apache/whirr/compute/StartupProcess.java?rev=1337952&r1=1337951&r2=1337952&view=diff
==============================================================================
--- whirr/branches/branch-0.7/core/src/main/java/org/apache/whirr/compute/StartupProcess.java (original)
+++ whirr/branches/branch-0.7/core/src/main/java/org/apache/whirr/compute/StartupProcess.java Sun May 13 18:00:50 2012
@@ -133,15 +133,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();