You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by pengjianhua <pe...@zte.com.cn> on 2017/07/13 09:10:16 UTC
Review Request 60837: The pidf's assignment logic in ranger-kms-initd
should be consistent with the pidf's assignment logic in ranger-kms
-----------------------------------------------------------
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
Re: Review Request 60837: The pidf's assignment logic in
ranger-kms-initd
should be consistent with the pidf's assignment logic in ranger-kms
Posted by Qiang Zhang <zh...@zte.com.cn>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60837/#review180506
-----------------------------------------------------------
Ship it!
Ship It!
- Qiang Zhang
On 七月 13, 2017, 9:10 a.m., pengjianhua wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60837/
> -----------------------------------------------------------
>
> (Updated 七月 13, 2017, 9:10 a.m.)
>
>
> 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
>
>
Re: Review Request 60837: The pidf's assignment logic in
ranger-kms-initd
should be consistent with the pidf's assignment logic in ranger-kms
Posted by Colm O hEigeartaigh <co...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60837/#review180530
-----------------------------------------------------------
Ship it!
Ship It!
- Colm O hEigeartaigh
On July 13, 2017, 9:10 a.m., pengjianhua wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60837/
> -----------------------------------------------------------
>
> (Updated July 13, 2017, 9:10 a.m.)
>
>
> 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
>
>