ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From v..@apache.org
Subject incubator-ranger git commit: RANGER-641 : Ranger KMS startup fails if java not set and started using service
Date Fri, 11 Sep 2015 17:01:10 GMT
Repository: incubator-ranger
Updated Branches:
  refs/heads/ranger-0.5 8d7b6cd73 -> 9adc04efd


RANGER-641 : Ranger KMS startup fails if java not set and started using service

Signed-off-by: Velmurugan Periasamy <vel@apache.org>


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

Branch: refs/heads/ranger-0.5
Commit: 9adc04efd568746d98232efbcaa1b7525c5ee3a4
Parents: 8d7b6cd
Author: Gautam Borad <gborad@gmail.com>
Authored: Thu Sep 3 17:51:20 2015 +0530
Committer: Velmurugan Periasamy <vel@apache.org>
Committed: Fri Sep 11 13:01:30 2015 -0400

----------------------------------------------------------------------
 kms/scripts/ranger-kms | 4 ++++
 kms/scripts/setup.sh   | 6 +++---
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/9adc04ef/kms/scripts/ranger-kms
----------------------------------------------------------------------
diff --git a/kms/scripts/ranger-kms b/kms/scripts/ranger-kms
index 805ebcc..dfde6d5 100755
--- a/kms/scripts/ranger-kms
+++ b/kms/scripts/ranger-kms
@@ -32,6 +32,10 @@ RANGER_KMS_EWS_LIB_DIR="${RANGER_KMS_EWS_DIR}/webapp/WEB-INF/classes/lib"
 
 JAVA_OPTS=" ${JAVA_OPTS} -XX:MaxPermSize=256m -Xmx1024m -Xms1024m "
 
+if [ -f ${RANGER_KMS_DIR}/ews/webapp/WEB-INF/classes/conf/java_home.sh ]; then
+        . ${RANGER_KMS_DIR}/ews/webapp/WEB-INF/classes/conf/java_home.sh
+fi
+
 for custom_env_script in `find ${RANGER_KMS_DIR}/ews/webapp/WEB-INF/classes/conf/ -name "ranger-kms-env*"`;
do
         if [ -f $custom_env_script ]; then
                 . $custom_env_script

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/9adc04ef/kms/scripts/setup.sh
----------------------------------------------------------------------
diff --git a/kms/scripts/setup.sh b/kms/scripts/setup.sh
index 2e7dd8e..e0c3136 100755
--- a/kms/scripts/setup.sh
+++ b/kms/scripts/setup.sh
@@ -326,7 +326,7 @@ setup_kms(){
         log "[I] Adding ranger kms provider as services in hadoop-common jar"
 	for f in lib/hadoop-common*.jar
 	do
-        	jar -uf ${f}  META-INF/services/org.apache.hadoop.crypto.key.KeyProviderFactory
+        	 ${JAVA_HOME}/bin/jar -uf ${f}  META-INF/services/org.apache.hadoop.crypto.key.KeyProviderFactory
 		chown ${unix_user}:${unix_group} ${f}
 	done
         cd ${oldP}
@@ -334,8 +334,8 @@ setup_kms(){
 
 update_properties() {
 	newPropertyValue=''
-	#echo "export JAVA_HOME=${JAVA_HOME}" > ${WEBAPP_ROOT}/WEB-INF/classes/conf/java_home.sh
-	#chmod a+rx ${WEBAPP_ROOT}/WEB-INF/classes/conf/java_home.sh
+	echo "export JAVA_HOME=${JAVA_HOME}" > ${WEBAPP_ROOT}/WEB-INF/classes/conf/java_home.sh
+	chmod a+rx ${WEBAPP_ROOT}/WEB-INF/classes/conf/java_home.sh
 
 
 	to_file=$PWD/ews/webapp/WEB-INF/classes/conf/dbks-site.xml


Mime
View raw message