Description
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
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;
Attachments
Attachments
Issue Links
- links to