brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From geom...@apache.org
Subject [1/2] brooklyn-library git commit: Fix executeScript effector for MariaDB and PostreSQL
Date Fri, 07 Apr 2017 08:25:24 GMT
Repository: brooklyn-library
Updated Branches:
  refs/heads/master 3715b9904 -> 8dfcb5eaf


Fix executeScript effector for MariaDB and PostreSQL


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

Branch: refs/heads/master
Commit: 31b33af82e98c50e05edadbabc6b2abbecd79004
Parents: 3715b99
Author: Ivana Yovcheva <ivana.yovcheva@gmail.com>
Authored: Fri Apr 7 10:40:42 2017 +0300
Committer: Ivana Yovcheva <ivana.yovcheva@gmail.com>
Committed: Fri Apr 7 10:45:32 2017 +0300

----------------------------------------------------------------------
 .../apache/brooklyn/entity/database/mariadb/MariaDbSshDriver.java | 1 +
 .../brooklyn/entity/database/postgresql/PostgreSqlSshDriver.java  | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/31b33af8/software/database/src/main/java/org/apache/brooklyn/entity/database/mariadb/MariaDbSshDriver.java
----------------------------------------------------------------------
diff --git a/software/database/src/main/java/org/apache/brooklyn/entity/database/mariadb/MariaDbSshDriver.java
b/software/database/src/main/java/org/apache/brooklyn/entity/database/mariadb/MariaDbSshDriver.java
index ecc8698..a70b504 100644
--- a/software/database/src/main/java/org/apache/brooklyn/entity/database/mariadb/MariaDbSshDriver.java
+++ b/software/database/src/main/java/org/apache/brooklyn/entity/database/mariadb/MariaDbSshDriver.java
@@ -252,6 +252,7 @@ public class MariaDbSshDriver extends AbstractSoftwareProcessSshDriver
implement
                 SshEffectorTasks.ssh(
                                 "cd "+getRunDir(),
                                 getBaseDir()+"/bin/mysql --defaults-file="+getConfigFile()+"
< "+filenameAlreadyInstalledAtServer)
+                        .requiringExitCodeZero()
                         .summary("executing datastore script "+filenameAlreadyInstalledAtServer));
     }
 

http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/31b33af8/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlSshDriver.java
----------------------------------------------------------------------
diff --git a/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlSshDriver.java
b/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlSshDriver.java
index 0eec9cd..3c9e383 100644
--- a/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlSshDriver.java
+++ b/software/database/src/main/java/org/apache/brooklyn/entity/database/postgresql/PostgreSqlSshDriver.java
@@ -570,7 +570,8 @@ public class PostgreSqlSshDriver extends AbstractSoftwareProcessSshDriver
implem
         return DynamicTasks.queue(
             SshEffectorTasks.ssh(
                 "cd "+getRunDir(),
-                sudoAsUser("postgres", getInstallDir() + "/bin/psql -p " + entity.getAttribute(PostgreSqlNode.POSTGRESQL_PORT)
+ " --file " + filenameAlreadyInstalledAtServer))
+                sudoAsUser("postgres", getInstallDir() + "/bin/psql -p " + entity.getAttribute(PostgreSqlNode.POSTGRESQL_PORT)
+ " -v ON_ERROR_STOP=1 --file " + filenameAlreadyInstalledAtServer))
+                    .requiringExitCodeZero()
                 .summary("executing datastore script "+filenameAlreadyInstalledAtServer));
     }
 


Mime
View raw message