You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by neykov <gi...@git.apache.org> on 2015/05/11 14:53:15 UTC

[GitHub] incubator-brooklyn pull request: Initialize entity driver on rebin...

GitHub user neykov opened a pull request:

    https://github.com/apache/incubator-brooklyn/pull/636

    Initialize entity driver on rebind when on-fire

    Don't create the driver only when `SERVICE_STATE_EXPECTED=ON_FIRE` - the entity is considered permanently failed in this state. When only `SERVICE_STATE_ACTUAL=ON_FIRE` we still should be able to rebind successfully - failure was set by attached enrichers.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/neykov/incubator-brooklyn init-driver-rebind

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-brooklyn/pull/636.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #636
    
----
commit ed76233d5180e6a735a8cb1102309272033d8969
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Date:   2015-05-11T12:42:50Z

    Initialize driver on rebind when on-fire
    
    Skip driver initialization only when the entity is permanently marked failed with SERVICE_STATE_EXPECTED=ON_FIRE. When only SERVICE_STATE_ACTUAL=ON_FIRE, but SERVICE_STATE_EXPECTED=RUNNING then the entity should still be operational.

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Initialize entity driver on rebin...

Posted by neykov <gi...@git.apache.org>.
Github user neykov commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/636#issuecomment-102056390
  
    Updated comment.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Initialize entity driver on rebin...

Posted by sjcorbett <gi...@git.apache.org>.
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Initialize entity driver on rebin...

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/636#issuecomment-103103530
  
    good fix


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Initialize entity driver on rebin...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-brooklyn/pull/636


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---