You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by sv...@apache.org on 2016/10/31 11:12:54 UTC

[4/6] brooklyn-server git commit: AbstractApplication recovers from failure of children

AbstractApplication recovers from failure of children

Previously if a problem with child start up was fixed the application
would only recover if its start method was re-run.


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

Branch: refs/heads/master
Commit: dacf18b831e1e5e1383d662a873643a3c3cabac6
Parents: 035664d
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Authored: Thu Oct 20 16:42:02 2016 +0100
Committer: Sam Corbett <sa...@cloudsoftcorp.com>
Committed: Fri Oct 28 14:35:12 2016 +0100

----------------------------------------------------------------------
 .../java/org/apache/brooklyn/core/entity/AbstractApplication.java  | 2 +-
 .../java/org/apache/brooklyn/util/collections/QuorumCheck.java     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dacf18b8/core/src/main/java/org/apache/brooklyn/core/entity/AbstractApplication.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/entity/AbstractApplication.java b/core/src/main/java/org/apache/brooklyn/core/entity/AbstractApplication.java
index 70e07e4..1c9c298 100644
--- a/core/src/main/java/org/apache/brooklyn/core/entity/AbstractApplication.java
+++ b/core/src/main/java/org/apache/brooklyn/core/entity/AbstractApplication.java
@@ -154,7 +154,6 @@ public abstract class AbstractApplication extends AbstractEntity implements Star
             doStart(locationsToUse);
             postStart(locationsToUse);
 
-            ServiceStateLogic.ServiceNotUpLogic.clearNotUpIndicator(this, Attributes.SERVICE_STATE_ACTUAL);
         } catch (Exception e) {
             // TODO should probably remember these problems then clear?  if so, do it here ... or on all effectors?
             // ServiceProblemsLogic.updateProblemsIndicator(this, START, e);
@@ -163,6 +162,7 @@ public abstract class AbstractApplication extends AbstractEntity implements Star
             // no need to log here; the effector invocation should do that
             throw Exceptions.propagate(e);
         } finally {
+            ServiceStateLogic.ServiceNotUpLogic.clearNotUpIndicator(this, Attributes.SERVICE_STATE_ACTUAL);
             ServiceStateLogic.setExpectedState(this, Lifecycle.RUNNING);
         }
 

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/dacf18b8/utils/common/src/main/java/org/apache/brooklyn/util/collections/QuorumCheck.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/collections/QuorumCheck.java b/utils/common/src/main/java/org/apache/brooklyn/util/collections/QuorumCheck.java
index 44b5fa2..64216ec 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/collections/QuorumCheck.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/collections/QuorumCheck.java
@@ -55,7 +55,7 @@ public interface QuorumCheck {
             return new NumericQuorumCheck(1, 1.0, false, "allAndAtLeastOne");
         }
         /**
-         * Requires at least one member that should be up is up.
+         * Requires at least one member that should be up.
          */
         public static QuorumCheck atLeastOne() {
             return new NumericQuorumCheck(1, 0.0, false, "atLeastOne");