You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by al...@apache.org on 2015/12/03 20:10:10 UTC
[4/5] incubator-brooklyn git commit: populateServiceNotUpDiagnostics:
clear when healthy
populateServiceNotUpDiagnostics: clear when healthy
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/dafb5ecd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/dafb5ecd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/dafb5ecd
Branch: refs/heads/master
Commit: dafb5ecdfa3ff9326c14a40dbed37e8b556a8cf5
Parents: 1c63b71
Author: Aled Sage <al...@gmail.com>
Authored: Thu Dec 3 17:03:51 2015 +0000
Committer: Aled Sage <al...@gmail.com>
Committed: Thu Dec 3 17:03:51 2015 +0000
----------------------------------------------------------------------
.../entity/software/base/SoftwareProcessImpl.java | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/dafb5ecd/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 40c70b6..d3e6593 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
@@ -186,23 +186,33 @@ public abstract class SoftwareProcessImpl extends AbstractEntity implements Soft
public void populateServiceNotUpDiagnostics() {
if (getDriver() == null) {
ServiceStateLogic.updateMapSensorEntry(this, ServiceStateLogic.SERVICE_NOT_UP_DIAGNOSTICS, "driver", "No driver");
+ ServiceStateLogic.clearMapSensorEntry(this, ServiceStateLogic.SERVICE_NOT_UP_DIAGNOSTICS, "sshable");
+ ServiceStateLogic.clearMapSensorEntry(this, ServiceStateLogic.SERVICE_NOT_UP_DIAGNOSTICS, SERVICE_PROCESS_IS_RUNNING.getName());
return;
+ } else {
+ ServiceStateLogic.clearMapSensorEntry(this, ServiceStateLogic.SERVICE_NOT_UP_DIAGNOSTICS, "driver");
}
Location loc = getDriver().getLocation();
if (loc instanceof SshMachineLocation) {
- if (!((SshMachineLocation)loc).isSshable()) {
+ if (((SshMachineLocation)loc).isSshable()) {
+ ServiceStateLogic.clearMapSensorEntry(this, ServiceStateLogic.SERVICE_NOT_UP_DIAGNOSTICS, "sshable");
+ } else {
ServiceStateLogic.updateMapSensorEntry(
this,
ServiceStateLogic.SERVICE_NOT_UP_DIAGNOSTICS,
"sshable",
"The machine for this entity does not appear to be sshable");
}
- return;
}
boolean processIsRunning = getDriver().isRunning();
- if (!processIsRunning) {
+ if (processIsRunning) {
+ ServiceStateLogic.clearMapSensorEntry(
+ this,
+ ServiceStateLogic.SERVICE_NOT_UP_DIAGNOSTICS,
+ SERVICE_PROCESS_IS_RUNNING.getName());
+ } else {
ServiceStateLogic.updateMapSensorEntry(
this,
ServiceStateLogic.SERVICE_NOT_UP_DIAGNOSTICS,