From d9519b6bd38117ec050892377df9209033e8e65f Mon Sep 17 00:00:00 2001 From: wangxiaopeng Date: Wed, 1 Jun 2016 03:14:51 -0400 Subject: [PATCH] issue 1137: waiting longer for stopping xcatd when the system load of xCAT MN is heavy --- xCAT-server/etc/init.d/xcatd | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/xCAT-server/etc/init.d/xcatd b/xCAT-server/etc/init.d/xcatd index c9b2ef45c..1334c0ac2 100755 --- a/xCAT-server/etc/init.d/xcatd +++ b/xCAT-server/etc/init.d/xcatd @@ -103,15 +103,21 @@ stop) fi kill -TERM -`cat /var/run/xcatd.pid` i=0; - while $STATUS > /dev/null 2>&1 && [ $i -lt 15 ]; do + while $STATUS > /dev/null 2>&1 && [ $i -lt 30 ]; do sleep .1 i=$((i+1)) done $STATUS > /dev/null 2>&1 + if [ "$?" = "0" ]; then kill -KILL -`cat /var/run/xcatd.pid` + i=0 + while $STATUS > /dev/null 2>&1 && [ $i -lt 30 ]; do + sleep .1 + i=$((i+1)) + done fi - sleep .1 + $STATUS > /dev/null 2>&1 if [ "$?" = "0" ]; then $LOG_FAILURE