Github user neykov commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/356#discussion_r80883724 --- Diff: software/base/src/main/java/org/apache/brooklyn/entity/software/base/SoftwareProcessImpl.java --- @@ -440,12 +441,20 @@ public void rebind() { //Only if the expected state is ON_FIRE then the entity has permanently failed. Transition expectedState = getAttribute(SERVICE_STATE_EXPECTED); if (expectedState == null || expectedState.getState() != Lifecycle.RUNNING) { + //FIXME does not set on fire root application + if (expectedState.getState() == Lifecycle.STARTING || expectedState.getState() == Lifecycle.STOPPING) { + setAttribute(SERVICE_STATE_EXPECTED, new Lifecycle.Transition(Lifecycle.ON_FIRE, new Date())); + setAttribute(SERVICE_STATE_ACTUAL, Lifecycle.ON_FIRE); + } LOG.warn("On rebind of {}, not calling software process rebind hooks because expected state is {}", this, expectedState); return; } Lifecycle actualState = getAttribute(SERVICE_STATE_ACTUAL); if (actualState == null || actualState != Lifecycle.RUNNING) { + if (expectedState.getState() == Lifecycle.STARTING || expectedState.getState() == Lifecycle.STOPPING) { + setAttribute(SERVICE_STATE_ACTUAL, Lifecycle.ON_FIRE); + } --- End diff -- Not sure about this one, wonder what conditions would cause it (excluding setting it on fire from above). The message below won't be correct any more if you change the state, can you update it (or log a separate msg for this case).
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---