You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by pr...@apache.org on 2018/11/03 02:45:06 UTC
ranger git commit: RANGER-2275: Make db_setup retry delay configurable
Repository: ranger
Updated Branches:
refs/heads/master c6b5e845c -> ac1b1bdf3
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/ac1b1bdf
Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/ac1b1bdf
Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/ac1b1bdf
Branch: refs/heads/master
Commit: ac1b1bdf39b96e53282ba989c865cd819d5d4b68
Parents: c6b5e84
Author: Pradeep <pr...@apache.org>
Authored: Fri Nov 2 09:42:04 2018 +0530
Committer: Pradeep <pr...@apache.org>
Committed: Sat Nov 3 08:14:51 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/ac1b1bdf/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/ac1b1bdf/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