brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From drigod...@apache.org
Subject [1/9] brooklyn-server git commit: VanillaSoftwareProcess: delete default ‘launch.command’ val
Date Fri, 15 Sep 2017 11:42:13 GMT
Repository: brooklyn-server
Updated Branches:
  refs/heads/master 7a434e340 -> 001730b86


VanillaSoftwareProcess: delete default ‘launch.command’ val

Previously value was `./start.sh` which was confusing if someone saw
it in an error message, and was pretty much never right.


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

Branch: refs/heads/master
Commit: 8fa7b781af96c67913bee70a1e704fd05686de60
Parents: cb416a2
Author: Aled Sage <aled.sage@gmail.com>
Authored: Tue Sep 12 16:06:38 2017 +0100
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Tue Sep 12 18:31:57 2017 +0100

----------------------------------------------------------------------
 .../entity/software/base/VanillaSoftwareProcess.java    |  3 ---
 .../software/base/VanillaSoftwareProcessSshDriver.java  | 12 ++++++++----
 2 files changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/8fa7b781/software/base/src/main/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcess.java
----------------------------------------------------------------------
diff --git a/software/base/src/main/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcess.java
b/software/base/src/main/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcess.java
index 1c55ddd..a979064 100644
--- a/software/base/src/main/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcess.java
+++ b/software/base/src/main/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcess.java
@@ -20,8 +20,6 @@ package org.apache.brooklyn.entity.software.base;
 
 import org.apache.brooklyn.api.catalog.Catalog;
 import org.apache.brooklyn.api.entity.ImplementedBy;
-import org.apache.brooklyn.config.ConfigKey;
-import org.apache.brooklyn.core.config.ConfigKeys;
 
 /** 
  * A {@link SoftwareProcess} entity that runs commands from an archive.
@@ -58,5 +56,4 @@ import org.apache.brooklyn.core.config.ConfigKeys;
 @Catalog(name="Vanilla Software Process", description="A software process configured with
scripts, e.g. for launch, check-running and stop")
 @ImplementedBy(VanillaSoftwareProcessImpl.class)
 public interface VanillaSoftwareProcess extends AbstractVanillaProcess {
-    ConfigKey<String> LAUNCH_COMMAND = ConfigKeys.newConfigKeyWithDefault(AbstractVanillaProcess.LAUNCH_COMMAND,
"./start.sh");
 }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/8fa7b781/software/base/src/main/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcessSshDriver.java
----------------------------------------------------------------------
diff --git a/software/base/src/main/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcessSshDriver.java
b/software/base/src/main/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcessSshDriver.java
index f2287ab..07afb74 100644
--- a/software/base/src/main/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcessSshDriver.java
+++ b/software/base/src/main/java/org/apache/brooklyn/entity/software/base/VanillaSoftwareProcessSshDriver.java
@@ -156,10 +156,14 @@ public class VanillaSoftwareProcessSshDriver extends AbstractSoftwareProcessSshD
 
     @Override
     public void launch() {
-        newScript(LAUNCHING)
-            .failOnNonZeroResultCode()
-            .body.append(getEntity().getConfig(VanillaSoftwareProcess.LAUNCH_COMMAND))
-            .execute();
+        String launchCommand = getEntity().getConfig(VanillaSoftwareProcess.LAUNCH_COMMAND);
+        
+        if (Strings.isNonBlank(launchCommand)) {
+            newScript(LAUNCHING)
+                .failOnNonZeroResultCode()
+                .body.append(launchCommand)
+                .execute();
+        }
     }
 
     @Override


Mime
View raw message