ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prad...@apache.org
Subject ranger git commit: RANGER-2275: Make db_setup retry delay configurable
Date Sat, 03 Nov 2018 02:49:36 GMT
Repository: ranger
Updated Branches:
  refs/heads/ranger-1 f09e0d170 -> 051d2e988


RANGER-2275: Make db_setup retry delay configurable


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

Branch: refs/heads/ranger-1
Commit: 051d2e988ef3ddd461df70bf9f9631771305b398
Parents: f09e0d1
Author: Pradeep <pradeep@apache.org>
Authored: Fri Nov 2 09:42:04 2018 +0530
Committer: Pradeep <pradeep@apache.org>
Committed: Sat Nov 3 08:19:31 2018 +0530

----------------------------------------------------------------------
 security-admin/scripts/db_setup.py        | 9 +++++++++
 security-admin/scripts/install.properties | 2 ++
 2 files changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/051d2e98/security-admin/scripts/db_setup.py
----------------------------------------------------------------------
diff --git a/security-admin/scripts/db_setup.py b/security-admin/scripts/db_setup.py
index 3450fa6..f84c8ca 100644
--- a/security-admin/scripts/db_setup.py
+++ b/security-admin/scripts/db_setup.py
@@ -3666,6 +3666,15 @@ def main(argv):
 	FORMAT = '%(asctime)-15s %(message)s'
 	logging.basicConfig(format=FORMAT, level=logging.DEBUG)
 
+	global retryPatchAfterSeconds
+	retryPatchAfterSeconds=120
+	if 'PATCH_RETRY_INTERVAL' in globalDict:
+		interval = globalDict['PATCH_RETRY_INTERVAL']
+		try:
+			retryPatchAfterSeconds=int(interval)
+		except ValueError:
+			retryPatchAfterSeconds=120
+
 	if (not 'JAVA_HOME' in os.environ) or (os.environ['JAVA_HOME'] == ""):
 		log("[E] ---------- JAVA_HOME environment property not defined, aborting installation.
----------", "error")
 		sys.exit(1)

http://git-wip-us.apache.org/repos/asf/ranger/blob/051d2e98/security-admin/scripts/install.properties
----------------------------------------------------------------------
diff --git a/security-admin/scripts/install.properties b/security-admin/scripts/install.properties
index 30b946b..f52c6b2 100644
--- a/security-admin/scripts/install.properties
+++ b/security-admin/scripts/install.properties
@@ -227,6 +227,8 @@ JAVA_VERSION_REQUIRED='1.7'
 JAVA_ORACLE='Java(TM) SE Runtime Environment'
 
 ranger_admin_max_heap_size=1g
+#retry DB and Java patches after the given time in seconds.
+PATCH_RETRY_INTERVAL=120
 
 #mysql_create_user_file=${PWD}/db/mysql/create_dev_user.sql
 mysql_core_file=db/mysql/optimized/current/ranger_core_db_mysql.sql


Mime
View raw message