summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeghana Madhusudhan <mmadhusu@redhat.com>2014-10-21 19:50:29 +0530
committerVijay Bellur <vbellur@redhat.com>2014-10-24 01:16:54 -0700
commita7a8a7507ca938b23d20a52931fa034cfaaa29f8 (patch)
tree8d0dd09101924ec34e1c18a9a78a8bfe69043e18
parent0386f0a51e7e445c66bedc7472037e22066eb66a (diff)
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 <mmadhusu@redhat.com> Reviewed-on: http://review.gluster.org/8966 Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rwxr-xr-xextras/hook-scripts/reset/post/S31ganesha-reset.sh6
1 files changed, 5 insertions, 1 deletions
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