Github user sjcorbett commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/636#discussion_r30309477
  
    --- Diff: 
software/base/src/main/java/brooklyn/entity/basic/SoftwareProcessImpl.java ---
    @@ -350,12 +349,19 @@ public void onManagementStarted() {
         
         @Override
         public void rebind() {
    -        Lifecycle state = getAttribute(SERVICE_STATE_ACTUAL);
    -        if (state == null || state != Lifecycle.RUNNING) {
    -            log.warn("On rebind of {}, not calling software process rebind 
hooks because state is {}", this, state);
    +        //SERVICE_STATE_ACTUAL might be ON_FIRE due to a temporary 
condition (problems map non-empty)
    +        //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) {
    +            log.warn("On rebind of {}, not calling software process rebind 
hooks because state is {}", this, expectedState);
    --- End diff --
    
    Minor but possibly worthwhile: could you clarify that the state referenced 
is `expectedState`, not `actualState`?


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to