cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aprat...@apache.org
Subject git commit: updated refs/heads/master to 23280a4
Date Wed, 11 Jun 2014 05:55:13 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master e61dda7d8 -> 23280a47b


CLOUDSTACK-6702 : [Windows]Due to Progress bar changes mysql path was not getting read. Fixing
the same.

Signed-off-by: Abhinandan Prateek <aprateek@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/23280a47
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/23280a47
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/23280a47

Branch: refs/heads/master
Commit: 23280a47b800fb434b1fa0d7ee0401a6777dec39
Parents: e61dda7
Author: Damodar Reddy <damoder.reddy@citrix.com>
Authored: Thu Jun 5 15:45:53 2014 +0530
Committer: Abhinandan Prateek <aprateek@apache.org>
Committed: Wed Jun 11 11:25:02 2014 +0530

----------------------------------------------------------------------
 scripts/installer/windows/acs.wxs     |  4 ++--
 setup/bindir/cloud-setup-databases.in | 11 +++++++++--
 2 files changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/23280a47/scripts/installer/windows/acs.wxs
----------------------------------------------------------------------
diff --git a/scripts/installer/windows/acs.wxs b/scripts/installer/windows/acs.wxs
index 58af650..83bac54 100644
--- a/scripts/installer/windows/acs.wxs
+++ b/scripts/installer/windows/acs.wxs
@@ -258,10 +258,10 @@
       ExeCommand='[PYTHON_HOME]\python "[CSMANAGEMENT]\webapps\client\WEB-INF\classes\scripts\common\keys\ssl-keys.py"
"[CSMANAGEMENT]\lib"'
       Execute="deferred" Return="check" />
     <CustomAction Id="DeployDB" Directory='CSMANAGEMENT'
-      ExeCommand='[PYTHON_HOME]\python "[INSTALLDIR]\scripts\cloud-setup-databases" [DB_USERNAME]:[DB_PASSWORD]@[DB_HOSTNAME]
--deploy-as=root:[DB_ROOT_PASSWORD] -c "[CSMANAGEMENT]\lib" -f "[CSMANAGEMENT]\setup" -j "[CSMANAGEMENT]\webapps\client\WEB-INF\lib\jasypt-1.9.0.jar"
-n "[CSMANAGEMENT]\lib\key"'
+      ExeCommand='[PYTHON_HOME]\python "[INSTALLDIR]\scripts\cloud-setup-databases" [DB_USERNAME]:[DB_PASSWORD]@[DB_HOSTNAME]
--deploy-as=root:[DB_ROOT_PASSWORD] -c "[CSMANAGEMENT]\lib" -f "[CSMANAGEMENT]\setup" -j "[CSMANAGEMENT]\webapps\client\WEB-INF\lib\jasypt-1.9.0.jar"
-n "[CSMANAGEMENT]\lib\key" -b "[MYSQL]\bin"'
       Execute="deferred" Return="check" Impersonate="no"/>
     <CustomAction Id="SetupDatabases" Directory='CSMANAGEMENT'
-      ExeCommand='[PYTHON_HOME]\python "[INSTALLDIR]\scripts\cloud-setup-databases" [DB_USERNAME]:[DB_PASSWORD]@[DB_HOSTNAME]
-c "[CSMANAGEMENT]\lib" -f "[CSMANAGEMENT]\setup" -j "[CSMANAGEMENT]\webapps\client\WEB-INF\lib\jasypt-1.9.0.jar"
-n "[CSMANAGEMENT]\lib\key"'
+      ExeCommand='[PYTHON_HOME]\python "[INSTALLDIR]\scripts\cloud-setup-databases" [DB_USERNAME]:[DB_PASSWORD]@[DB_HOSTNAME]
-c "[CSMANAGEMENT]\lib" -f "[CSMANAGEMENT]\setup" -j "[CSMANAGEMENT]\webapps\client\WEB-INF\lib\jasypt-1.9.0.jar"
-n "[CSMANAGEMENT]\lib\key" -b "[MYSQL]\bin"'
       Execute="deferred" Return="check" Impersonate="no"/>
 
     <InstallExecuteSequence>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/23280a47/setup/bindir/cloud-setup-databases.in
----------------------------------------------------------------------
diff --git a/setup/bindir/cloud-setup-databases.in b/setup/bindir/cloud-setup-databases.in
index d9dc54f..272ff81 100755
--- a/setup/bindir/cloud-setup-databases.in
+++ b/setup/bindir/cloud-setup-databases.in
@@ -71,6 +71,7 @@ class DBDeployer(object):
     success = False
     magicString = 'This_is_a_magic_string_i_think_no_one_will_duplicate'
     tmpMysqlFile = os.path.join(os.path.expanduser('~/'), 'cloudstackmysql.tmp.sql')
+    mysqlBinPath = None
 
     def preRun(self):
         def backUpDbDotProperties():
@@ -138,9 +139,12 @@ class DBDeployer(object):
 
         kwargs['port'] = self.port
         kwargs['host'] = self.host
-
+        if self.mysqlBinPath is not None:
+          mysqlPath = '"' + self.mysqlBinPath + os.sep + "mysql" + '"'
+        else:
+          mysqlPath = "mysql"
         try:
-            mysqlCmds = ['mysql', '--user=%s'%kwargs['user'], '--host=%s'%kwargs['host'],
'--port=%s'%kwargs['port']]
+            mysqlCmds = [mysqlPath, '--user=%s'%kwargs['user'], '--host=%s'%kwargs['host'],
'--port=%s'%kwargs['port']]
             if kwargs.has_key('passwd'):
                 mysqlCmds.append('--password=%s'%kwargs['passwd'])
             file(self.tmpMysqlFile, 'w').write(text)
@@ -462,6 +466,8 @@ for example:
               self.encryptionKeyFile = self.options.encryptionKeyFile
             if self.options.encryptionJarPath:
               self.encryptionJarPath = self.options.encryptionJarPath
+            if self.options.mysqlbinpath:
+              self.mysqlBinPath = self.options.mysqlbinpath
 
         def parseUserAndPassword(cred):
             stuff = cred.split(':')
@@ -582,6 +588,7 @@ for example:
         self.parser.add_option("-f", "--db-files-path", action="store", dest="dbFilesPath",
help="The path to find sql files to create initial database(s)")
         self.parser.add_option("-j", "--encryption-jar-path", action="store", dest="encryptionJarPath",
help="The path to the jasypt library to be used to encrypt the values in db.properties")
         self.parser.add_option("-n", "--encryption-key-file", action="store", dest="encryptionKeyFile",
help="The name of the file in which encryption key to be generated")
+        self.parser.add_option("-b", "--mysql-bin-path", action="store", dest="mysqlbinpath",
help="The mysql installed bin path")
 
         (self.options, self.args) = self.parser.parse_args()
         parseCasualCredit()


Mime
View raw message