service-not-up-diagnotics: donât call driver.isRunning on creation
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/874a3a86 Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/874a3a86 Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/874a3a86 Branch: refs/heads/master Commit: 874a3a86d1689bdbf63d4835d70bd84d25a07ca6 Parents: 10071a9 Author: Aled Sage <[email protected]> Authored: Mon Sep 21 21:36:36 2015 +0100 Committer: Aled Sage <[email protected]> Committed: Wed Sep 23 01:32:48 2015 +0100 ---------------------------------------------------------------------- .../apache/brooklyn/entity/software/base/SoftwareProcessImpl.java | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/874a3a86/software/base/src/main/java/org/apache/brooklyn/entity/software/base/SoftwareProcessImpl.java ---------------------------------------------------------------------- diff --git a/software/base/src/main/java/org/apache/brooklyn/entity/software/base/SoftwareProcessImpl.java b/software/base/src/main/java/org/apache/brooklyn/entity/software/base/SoftwareProcessImpl.java index b635242..d7d8e42f 100644 --- a/software/base/src/main/java/org/apache/brooklyn/entity/software/base/SoftwareProcessImpl.java +++ b/software/base/src/main/java/org/apache/brooklyn/entity/software/base/SoftwareProcessImpl.java @@ -171,6 +171,8 @@ public abstract class SoftwareProcessImpl extends AbstractEntity implements Soft Lifecycle state = entity.getAttribute(SERVICE_STATE_ACTUAL); if (up == null || up) { entity.sensors().set(ServiceStateLogic.SERVICE_NOT_UP_DIAGNOSTICS, ImmutableMap.<String, Object>of()); + } else if (state == null || state == Lifecycle.CREATED) { + // not yet started; do nothing } else if (state == Lifecycle.STOPPING || state == Lifecycle.STOPPED || state == Lifecycle.DESTROYED) { // stopping/stopped, so expect not to be up; get rid of the diagnostics. entity.sensors().set(ServiceStateLogic.SERVICE_NOT_UP_DIAGNOSTICS, ImmutableMap.<String, Object>of());
