Return-Path: X-Original-To: apmail-brooklyn-dev-archive@minotaur.apache.org Delivered-To: apmail-brooklyn-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4248F10BE5 for ; Tue, 5 May 2015 15:31:42 +0000 (UTC) Received: (qmail 56581 invoked by uid 500); 5 May 2015 15:31:42 -0000 Delivered-To: apmail-brooklyn-dev-archive@brooklyn.apache.org Received: (qmail 56549 invoked by uid 500); 5 May 2015 15:31:42 -0000 Mailing-List: contact dev-help@brooklyn.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.incubator.apache.org Delivered-To: mailing list dev@brooklyn.incubator.apache.org Received: (qmail 56533 invoked by uid 99); 5 May 2015 15:31:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 May 2015 15:31:41 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= X-Spam-Check-By: apache.org Received-SPF: error (athena.apache.org: local policy) Received: from [54.164.171.186] (HELO mx1-us-east.apache.org) (54.164.171.186) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 May 2015 15:31:37 +0000 Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with SMTP id DAB0C42E76 for ; Tue, 5 May 2015 15:30:56 +0000 (UTC) Received: (qmail 53879 invoked by uid 99); 5 May 2015 15:30:56 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 May 2015 15:30:56 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4B2B3E0FE2; Tue, 5 May 2015 15:30:56 +0000 (UTC) From: neykov To: dev@brooklyn.incubator.apache.org Reply-To: dev@brooklyn.incubator.apache.org References: In-Reply-To: Subject: [GitHub] incubator-brooklyn pull request: Don't fail on startup in case of ... Content-Type: text/plain Message-Id: <20150505153056.4B2B3E0FE2@git1-us-west.apache.org> Date: Tue, 5 May 2015 15:30:56 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Github user neykov commented on a diff in the pull request: https://github.com/apache/incubator-brooklyn/pull/624#discussion_r29680075 --- 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); --- End diff -- I'd like to treat exceptions from `isRunning` analogously to returning false. This means setting the expected state to `RUNNING` and the actual state (coming from the enrichers) to 'ON-FIRE' (because of the failing check). --- 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. ---