You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by ri...@apache.org on 2014/06/05 17:25:15 UTC

[4/5] git commit: Set state to RUNNING if nothing ON_FIRE and some children RUNNING

Set state to RUNNING if nothing ON_FIRE and some children RUNNING


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

Branch: refs/heads/master
Commit: dd905e66ed4c7a9c818581734996e270e4f76997
Parents: 1c21938
Author: Andrew Kennedy <an...@cloudsoftcorp.com>
Authored: Wed Jun 4 23:20:20 2014 +0100
Committer: Andrew Kennedy <an...@cloudsoftcorp.com>
Committed: Wed Jun 4 23:20:49 2014 +0100

----------------------------------------------------------------------
 core/src/main/java/brooklyn/entity/group/DynamicClusterImpl.java | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/dd905e66/core/src/main/java/brooklyn/entity/group/DynamicClusterImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/entity/group/DynamicClusterImpl.java b/core/src/main/java/brooklyn/entity/group/DynamicClusterImpl.java
index 7124bf2..c829593 100644
--- a/core/src/main/java/brooklyn/entity/group/DynamicClusterImpl.java
+++ b/core/src/main/java/brooklyn/entity/group/DynamicClusterImpl.java
@@ -293,6 +293,8 @@ public class DynamicClusterImpl extends AbstractGroupImpl implements DynamicClus
             int onFire = Iterables.frequency(memberStates, Lifecycle.ON_FIRE);
             if ((getInitialQuorumSize() > 0 ? running < getInitialQuorumSize() : true) && onFire > 0) {
                 currentState = Lifecycle.ON_FIRE;
+            } else if (onFire == 0 && running > 0) {
+                currentState = Lifecycle.RUNNING;
             }
         }
         return currentState;