From bf6196b876e487c8a37e148b92721f0d85bcfd43 Mon Sep 17 00:00:00 2001 From: Meghana Madhusudhan Date: Tue, 21 Oct 2014 19:50:29 +0530 Subject: Hooks : Infinite while loop introduced by another change. A change made to all the hook scripts introduced an infinite while loop in the script S31ganesha-reset.sh. It resulted in 100% CPU usage by this script. Change-Id: I8133c92d46616b6534fc88158d6dbfca49875f4a BUG: 1157374 Reviewed-on: http://review.gluster.org/8974 Reviewed-by: Raghavendra Talur Reviewed-by: soumya k Reviewed-by: Vijay Bellur Tested-by: Vijay Bellur --- extras/hook-scripts/reset/post/S31ganesha-reset.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'extras') diff --git a/extras/hook-scripts/reset/post/S31ganesha-reset.sh b/extras/hook-scripts/reset/post/S31ganesha-reset.sh index c0be3f3841d..8191d960592 100755 --- a/extras/hook-scripts/reset/post/S31ganesha-reset.sh +++ b/extras/hook-scripts/reset/post/S31ganesha-reset.sh @@ -17,6 +17,10 @@ function parse_args () { shift GLUSTERD_WORKDIR=$1 ;; + *) + shift + break + ;; esac shift done @@ -29,7 +33,7 @@ function is_volume_started () { } parse_args $@ -if ps auxwww | grep -q "[g]anesha.nfsd" +if ps aux | grep -q "[g]anesha.nfsd" then kill -s TERM `cat /var/run/ganesha.pid` sleep 10 -- cgit