ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sneet...@apache.org
Subject incubator-ranger git commit: RANGER-418: updated upgrade script to generate proper audit db
Date Thu, 23 Apr 2015 03:08:57 GMT
Repository: incubator-ranger
Updated Branches:
  refs/heads/master d9edf2fc1 -> 168c13531


RANGER-418: updated upgrade script to generate proper audit db


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

Branch: refs/heads/master
Commit: 168c1353141c3f756215bb48b6694d6ae277f4c1
Parents: d9edf2f
Author: sneethiraj <sneethir@apache.org>
Authored: Wed Apr 22 23:08:49 2015 -0400
Committer: sneethiraj <sneethir@apache.org>
Committed: Wed Apr 22 23:08:49 2015 -0400

----------------------------------------------------------------------
 security-admin/scripts/upgrade_admin.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/168c1353/security-admin/scripts/upgrade_admin.py
----------------------------------------------------------------------
diff --git a/security-admin/scripts/upgrade_admin.py b/security-admin/scripts/upgrade_admin.py
index 9c2f2dc..c12552c 100755
--- a/security-admin/scripts/upgrade_admin.py
+++ b/security-admin/scripts/upgrade_admin.py
@@ -198,6 +198,9 @@ def main():
 	auditJcksFileName = xaSysProps['auditDB.jdbc.credential.provider.path']
 	jcksFileName = xaSysProps['xaDB.jdbc.credential.provider.path']
 
+	auditJdbcUrl = xaSysProps['auditDB.jdbc.url']
+	auditHostTokens = auditJdbcUrl.split("//")
+	auditdbTokens = auditHostTokens[1].split("/")
 
 	tokens = jdbcUrl.split(":")
 	hostTokens = jdbcUrl.split("//")
@@ -211,7 +214,7 @@ def main():
 		installProps['SQL_COMMAND_INVOKER'] = 'mysql'
 		installProps['db_host'] = dbTokens[0]
 		installProps['db_name'] = dbTokens[1]
-		installProps['audit_db_name'] = dbTokens[1]
+		installProps['audit_db_name'] = auditdbTokens[1]
 		mysqlConnectorJarFileName = [ f for f in listdir(libFolder) if (isfile(join(libFolder,f))
and f.startswith("mysql") and f.endswith(".jar")) ]
 		if (len(mysqlConnectorJarFileName) >  0):
 			if not os.path.exists(tempLibFolder):


Mime
View raw message