[ 
https://issues.apache.org/jira/browse/RANGER-1693?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Qiang Zhang resolved RANGER-1693.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 1.0.0

> The pidf's assignment logic in ranger-kms-initd should be consistent with the 
> pidf's assignment logic in ranger-kms
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: RANGER-1693
>                 URL: https://issues.apache.org/jira/browse/RANGER-1693
>             Project: Ranger
>          Issue Type: Bug
>          Components: kms
>            Reporter: peng.jianhua
>            Assignee: peng.jianhua
>              Labels: patch
>             Fix For: 1.0.0
>
>         Attachments: 
> 0001-RANGER-1693-The-pidf-s-assignment-logic-in-ranger-km.patch
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to