-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60837/
-----------------------------------------------------------
Review request for ranger, Alok Lal, Ankita Sinha, Don Bosco Durai, Colm O
hEigeartaigh, Gautam Borad, Madhan Neethiraj, Ramesh Mani, Selvamohan
Neethiraj, Velmurugan Periasamy, and Qiang Zhang.
Bugs: RANGER-1693
https://issues.apache.org/jira/browse/RANGER-1693
Repository: ranger
Description
-------
The pidf's assignment logic in ranger-kms-initd is as following:
pidf=/var/run/ranger_kms/rangerkms.pid
if [ -f $pidf ]; then
pid=`cat $pidf`
else
pid=`ps -ef | grep java | grep -- '-Dproc_rangerkms' | grep -v grep | awk
'{ print $2 }'`
fi
the pidf's assignment logic in ranger-kms is as following:
realScriptPath=`readlink -f $0`
realScriptDir=`dirname $realScriptPath`
RANGER_KMS_DIR=`(cd $realScriptDir; pwd)`
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
fi
done
if [ -z "${RANGER_KMS_PID_NAME}" ]
then
RANGER_KMS_PID_NAME=rangerkms.pid
fi
if [ -z "${RANGER_KMS_PID_DIR_PATH}" ]
then
RANGER_KMS_PID_DIR_PATH=/var/run/ranger_kms
fi
if [ ! -d "${RANGER_KMS_PID_DIR_PATH}" ]
then
mkdir -p $RANGER_KMS_PID_DIR_PATH
chmod 660 $RANGER_KMS_PID_DIR_PATH
fi
pidf=${RANGER_KMS_PID_DIR_PATH}/${RANGER_KMS_PID_NAME}
if the value of RANGER_KMS_PID_DIR_PATH variable was changed, the value of pidf
in ranger-kms-initd is error.
Diffs
-----
kms/scripts/ranger-kms-initd 8d4fa3d
Diff: https://reviews.apache.org/r/60837/diff/1/
Testing
-------
Thanks,
pengjianhua