You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by co...@apache.org on 2017/03/20 12:13:22 UTC

[1/2] ranger git commit: RANGER-1465:Parse properties file error for kms

Repository: ranger
Updated Branches:
  refs/heads/master 2d9a32210 -> 3632b35d0


RANGER-1465:Parse properties file error for kms

Signed-off-by: Colm O hEigeartaigh <co...@apache.org>


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

Branch: refs/heads/master
Commit: 73eed772414e2bf0ae796d0368af20a822916bbd
Parents: 2d9a322
Author: peng.jianhua <pe...@zte.com.cn>
Authored: Fri Mar 17 05:40:27 2017 -0400
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Mon Mar 20 11:55:38 2017 +0000

----------------------------------------------------------------------
 kms/scripts/db_setup.py   | 8 ++++++--
 kms/scripts/dba_script.py | 8 ++++++--
 2 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/73eed772/kms/scripts/db_setup.py
----------------------------------------------------------------------
diff --git a/kms/scripts/db_setup.py b/kms/scripts/db_setup.py
index d8b4b63..fb89198 100644
--- a/kms/scripts/db_setup.py
+++ b/kms/scripts/db_setup.py
@@ -70,9 +70,13 @@ def populate_global_dict():
 	library_path = os.path.join(RANGER_KMS_HOME,"cred","lib","*")
 
 	for each_line in read_config_file.read().split('\n') :
-		if len(each_line) == 0 : continue
+		each_line = each_line.strip();
+		if len(each_line) == 0:
+			continue
+		elif each_line[0] == "#":
+			continue
 		if re.search('=', each_line):
-			key , value = each_line.strip().split("=",1)
+			key , value = each_line.split("=",1)
 			key = key.strip()
 			if 'PASSWORD' in key:
 				value = ''

http://git-wip-us.apache.org/repos/asf/ranger/blob/73eed772/kms/scripts/dba_script.py
----------------------------------------------------------------------
diff --git a/kms/scripts/dba_script.py b/kms/scripts/dba_script.py
index 1e264cc..c471f59 100755
--- a/kms/scripts/dba_script.py
+++ b/kms/scripts/dba_script.py
@@ -69,9 +69,13 @@ def populate_global_dict():
 	library_path = os.path.join(RANGER_KMS_HOME,"cred","lib","*")
 	read_config_file = open(os.path.join(RANGER_KMS_HOME,'install.properties'))
 	for each_line in read_config_file.read().split('\n') :
-		if len(each_line) == 0 : continue
+		each_line = each_line.strip();
+		if len(each_line) == 0:
+			continue
+		elif each_line[0] == "#":
+			continue
 		if re.search('=', each_line):
-			key , value = each_line.strip().split("=",1)
+			key , value = each_line.split("=",1)
 			key = key.strip()
 			if 'PASSWORD' in key:
 				value = ''


[2/2] ranger git commit: RANGER-1452:The install program used SOLR_RANGER_COLLECTION attribute value in Install and Configure Solr for Ranger Audits. But there is no corresponding setting in install.properties. So the user can only used fixed value durin

Posted by co...@apache.org.
RANGER-1452:The install program used SOLR_RANGER_COLLECTION attribute value in Install and Configure Solr for Ranger Audits. But there is no corresponding setting in install.properties. So the user can only used fixed value during installing.

Signed-off-by: Colm O hEigeartaigh <co...@apache.org>


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

Branch: refs/heads/master
Commit: 3632b35d01451d8f6983e46fbbc78ac54d8c0ce4
Parents: 73eed77
Author: peng.jianhua <pe...@zte.com.cn>
Authored: Tue Mar 14 00:50:37 2017 -0400
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Mon Mar 20 11:57:45 2017 +0000

----------------------------------------------------------------------
 security-admin/contrib/solr_for_audit_setup/install.properties | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/3632b35d/security-admin/contrib/solr_for_audit_setup/install.properties
----------------------------------------------------------------------
diff --git a/security-admin/contrib/solr_for_audit_setup/install.properties b/security-admin/contrib/solr_for_audit_setup/install.properties
index f5d8cef..fc9955d 100644
--- a/security-admin/contrib/solr_for_audit_setup/install.properties
+++ b/security-admin/contrib/solr_for_audit_setup/install.properties
@@ -91,6 +91,7 @@ SOLR_REPLICATION=1
 #SOLR_LOG_FOLDER=logs
 SOLR_LOG_FOLDER=/var/log/solr/ranger_audits
 
+SOLR_RANGER_COLLECTION=ranger_audits
 
 #Memory for Solr. Both min and max memory to the java process are set to this value.
 #Note: In production, please assign enough memory. It is recommended to have at least 2GB RAM.