From 2bc807f9748f406c2fdd55fe187b0dc74014d5e0 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Tue, 30 Apr 2013 15:33:12 +1000 Subject: eventscripts: Remove unused function ctdb_check_counter_limit() Signed-off-by: Martin Schwenke (This used to be ctdb commit a8ef00608e48a551a334aded206146807aeb4c5a) --- ctdb/config/functions | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'ctdb/config/functions') diff --git a/ctdb/config/functions b/ctdb/config/functions index 6c5891697c9..3572a008190 100755 --- a/ctdb/config/functions +++ b/ctdb/config/functions @@ -953,21 +953,6 @@ ctdb_counter_incr () { # unary counting! echo -n 1 >> "$_counter_file" } -ctdb_check_counter_limit () { - _ctdb_counter_common - - _limit="${1:-${service_fail_limit}}" - _quiet="$2" - - # unary counting! - _size=$(stat -c "%s" "$_counter_file" 2>/dev/null || echo 0) - if [ $_size -ge $_limit ] ; then - echo "ERROR: more than $_limit consecutive failures for $service_name, marking cluster unhealthy" - exit 1 - elif [ $_size -gt 0 -a -z "$_quiet" ] ; then - echo "WARNING: less than $_limit consecutive failures ($_size) for $service_name, not unhealthy yet" - fi -} ctdb_check_counter () { _msg="${1:-error}" # "error" - anything else is silent on fail _op="${2:--ge}" # an integer operator supported by test -- cgit