From: Jose A. Rivera Date: Tue, 10 May 2016 14:27:43 +0000 (+0200) Subject: ctdb-scripts: Cleanup service_check() in nfs-ganesha-callout X-Git-Tag: tdb-1.3.10~1135 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a540a0d213b41010fd084caa05cd57e3199d6a20;p=thirdparty%2Fsamba.git ctdb-scripts: Cleanup service_check() in nfs-ganesha-callout Signed-off-by: Jose A. Rivera Reviewed-by: Martin Schwenke --- diff --git a/ctdb/doc/examples/nfs-ganesha-callout b/ctdb/doc/examples/nfs-ganesha-callout index 634b673b85e..633667a08ab 100755 --- a/ctdb/doc/examples/nfs-ganesha-callout +++ b/ctdb/doc/examples/nfs-ganesha-callout @@ -128,7 +128,6 @@ service_start () # Nitty gritty - monitoring and IP handling GANRECDIR="/var/lib/nfs/ganesha" -GANRECDIR3="/var/lib/nfs/ganesha_local" # Return 'active' if the shared filesystem is accessible. get_cluster_fs_state () @@ -167,8 +166,6 @@ create_ganesha_recdirs () if [ ! -e "$GANRECDIR" ]; then ln -sv "$_link_dst" "$GANRECDIR" fi - - mkdir -p "$GANRECDIR3" } service_check () @@ -190,26 +187,6 @@ service_check () return 1 fi - # Check red conditions against limit - _reds_max=2 - _reds=$(ls $GANRECDIR3 | grep -c "red") - - if [ $_reds -ge $_reds_max ] ; then - echo "Too many red conditions (${_reds}/${_reds_max})" - return 1 - fi - - # Check for stall - _stall_max=120 - _now=$(date +"%s") - _last=$(ls -t $GANRECDIR3 | sed -n -e '1s@_.*@@p') - [ -n $_last ] || _last=$_now # Handle startup - _stall=$(($_now - $_last)) - if [ $_stall -ge $_stall_max ] ; then - echo "ERROR: Stalled for ${_stall} second(s)" - return 1 - fi - return 0 }