ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "bhavik patel (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (RANGER-2229) Perform graceful terminate with retries before doing forceful kill for usersync and tagsync
Date Tue, 16 Oct 2018 08:33:00 GMT

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

bhavik patel updated RANGER-2229:
---------------------------------
    Attachment: RANGER-2229-01.patch

> Perform graceful terminate with retries before doing forceful kill for usersync and tagsync
> -------------------------------------------------------------------------------------------
>
>                 Key: RANGER-2229
>                 URL: https://issues.apache.org/jira/browse/RANGER-2229
>             Project: Ranger
>          Issue Type: Bug
>          Components: tagsync, usersync
>    Affects Versions: 1.1.0
>            Reporter: suja s
>            Assignee: bhavik patel
>            Priority: Major
>         Attachments: RANGER-2229-01.patch, RANGER-2229.patch
>
>
> In ranger usersync and tagsync scripts, stop of the process is done forcefully using
kill -9.
> Suggestion is to do a graceful shutdown with retries and do a force kill only if graceful
shutdown is not successful.
> Stop section from ranger-tagsync-services.sh and ranger-tusersync-services.sh
> {noformat}
> lif [ "${action}" == "STOP" ]; then
>  WAIT_TIME_FOR_SHUTDOWN=2
>  NR_ITER_FOR_SHUTDOWN_CHECK=15
>  if [ -f "$pidf" ] ; then
>  pid=`cat $pidf` > /dev/null 2>&1
>  echo "Found Apache Ranger TagSync Service with pid $pid, Stopping..."
>  kill -9 $pid > /dev/null 2>&1
>  sleep 1 #Give kill -9 sometime to "kill"
>  if ps -p $pid > /dev/null; then
>  echo "Wow, even kill -9 failed, giving up! Sorry.."
>  else
>  rm -f $pidf
>  echo "Apache Ranger Tagsync Service pid = ${pid} has been stopped."
>  fi
>  else
>  echo "Ranger Tagsync Service not running"
>  fi
>  exit;
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message