From a7a8a7507ca938b23d20a52931fa034cfaaa29f8 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: If62d8f0e065c6e6511363b8b26eae433f59bc5c3 BUG: 1155489 Signed-off-by: Meghana Madhusudhan Reviewed-on: http://review.gluster.org/8966 Reviewed-by: soumya k Reviewed-by: Raghavendra Talur Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- extras/hook-scripts/reset/post/S31ganesha-reset.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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