brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorbett <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Don't fail on startup in case of ...
Date Tue, 05 May 2015 11:23:23 GMT
Github user sjcorbett commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/624#discussion_r29660367
  
    --- Diff: software/base/src/main/java/brooklyn/entity/basic/SoftwareProcessImpl.java ---
    @@ -494,17 +494,24 @@ public void waitForEntityStart() {
             CountdownTimer timer = startTimeout.countdownTimer();
             boolean isRunningResult = false;
             long delay = 100;
    +        Exception firstFailure = null;
             while (!isRunningResult && !timer.isExpired()) {
                 Time.sleep(delay);
                 try {
                     isRunningResult = driver.isRunning();
    +                if (log.isDebugEnabled()) log.debug("checked {}, 'is running' returned:
{}", this, isRunningResult);
                 } catch (Exception  e) {
    -                ServiceStateLogic.setExpectedState(this, Lifecycle.ON_FIRE);
    -                // provide extra context info, as we're seeing this happen in strange
circumstances
    -                if (driver==null) throw new IllegalStateException(this+" concurrent start
and shutdown detected");
    -                throw new IllegalStateException("Error detecting whether "+this+" is
running: "+e, e);
    +                Exceptions.propagateIfFatal(e);
    +                firstFailure = e;
    --- End diff --
    
    `firstFailure` would be better named `lastFailure`.


---
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.
---

Mime
View raw message