brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rich...@apache.org
Subject [11/16] git commit: Fix MonitSshDriver’s use of expandedInstallDir
Date Tue, 14 Oct 2014 10:05:01 GMT
Fix MonitSshDriver’s use of expandedInstallDir

Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/f7c7330d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/f7c7330d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/f7c7330d

Branch: refs/heads/master
Commit: f7c7330d102676b53e147c8b8b744aae178b5c3f
Parents: 3595fab
Author: Aled Sage <aled.sage@gmail.com>
Authored: Mon Oct 13 21:30:50 2014 +0100
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Mon Oct 13 21:30:50 2014 +0100

----------------------------------------------------------------------
 .../brooklyn/entity/monitoring/monit/MonitSshDriver.java  | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/f7c7330d/software/monitoring/src/main/java/brooklyn/entity/monitoring/monit/MonitSshDriver.java
----------------------------------------------------------------------
diff --git a/software/monitoring/src/main/java/brooklyn/entity/monitoring/monit/MonitSshDriver.java
b/software/monitoring/src/main/java/brooklyn/entity/monitoring/monit/MonitSshDriver.java
index 36be869..2272a00 100644
--- a/software/monitoring/src/main/java/brooklyn/entity/monitoring/monit/MonitSshDriver.java
+++ b/software/monitoring/src/main/java/brooklyn/entity/monitoring/monit/MonitSshDriver.java
@@ -37,7 +37,6 @@ import com.google.common.collect.ImmutableMap;
 
 public class MonitSshDriver extends AbstractSoftwareProcessSshDriver implements MonitDriver
{
     
-    private String expandedInstallDir;
     private String remoteControlFilePath;
     
     public MonitSshDriver(MonitNodeImpl entity, SshMachineLocation machine) {
@@ -88,7 +87,7 @@ public class MonitSshDriver extends AbstractSoftwareProcessSshDriver implements
         // NOTE: executing monit in daemon mode will spawn a separate process for the monit
daemon so the value of $! cannot be used
         // instead we use the -p argument
         String command = format("touch %s && nohup %s/bin/monit -c %s -p %s >
out.log 2> err.log < /dev/null &", getMonitPidFile(),
-            expandedInstallDir, remoteControlFilePath, getMonitPidFile());
+            getExpandedInstallDir(), remoteControlFilePath, getMonitPidFile());
         newScript(MutableMap.of("usePidFile", false), LAUNCHING)
             .updateTaskAndFailOnNonZeroResultCode()
             .body.append(command)
@@ -132,11 +131,6 @@ public class MonitSshDriver extends AbstractSoftwareProcessSshDriver
implements
     
     @Override
     public String getStatusCmd() {
-        return format("%s/bin/monit -c %s status", expandedInstallDir, remoteControlFilePath);
-    }
-    
-    @Override
-    public String getExpandedInstallDir() {
-        return expandedInstallDir;
+        return format("%s/bin/monit -c %s status", getExpandedInstallDir(), remoteControlFilePath);
     }
 }


Mime
View raw message