summaryrefslogtreecommitdiff
path: root/ctdb/config
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2015-08-10 16:03:05 +1000
committerMichael Adam <obnox@samba.org>2015-09-15 08:56:20 +0200
commit353c27deab30a86c94d76f0b8197fb84ce260d99 (patch)
tree186ded3757a755b48be3587eb7e4bdf2fd8e904c /ctdb/config
parent8c2948eba59d4ee24af1154c774c9fa79939bd91 (diff)
downloadsamba-353c27deab30a86c94d76f0b8197fb84ce260d99.tar.gz
ctdb-scripts: Drop functions ctdb_checkstatus() and ctdb_setstatus()
They're not used outside of ctdb_standard_event_helper(). As a consequence, make ctdb_standard_event_helper() do nothing. It is harder to remove because it is used in many places, perhaps by external eventscripts where it has been copied from existing scripts. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Jose A. Rivera <jarrpa@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'ctdb/config')
-rwxr-xr-xctdb/config/functions49
1 files changed, 1 insertions, 48 deletions
diff --git a/ctdb/config/functions b/ctdb/config/functions
index 42b467b8d93..0fc1fbe5fb3 100755
--- a/ctdb/config/functions
+++ b/ctdb/config/functions
@@ -700,43 +700,6 @@ is_ctdb_previously_managed_service ()
[ -f "$_ctdb_managed_file" ]
}
-########################################################
-# Check and set status
-
-log_status_cat ()
-{
- echo "node is \"$1\", \"${script_name}\" reports problem: $(cat $2)"
-}
-
-ctdb_checkstatus ()
-{
- if [ -r "$ctdb_status_dir/$script_name/unhealthy" ] ; then
- log_status_cat "unhealthy" "$ctdb_status_dir/$script_name/unhealthy"
- return 1
- elif [ -r "$ctdb_status_dir/$script_name/banned" ] ; then
- log_status_cat "banned" "$ctdb_status_dir/$script_name/banned"
- return 2
- else
- return 0
- fi
-}
-
-ctdb_setstatus ()
-{
- d="$ctdb_status_dir/$script_name"
- case "$1" in
- unhealthy|banned)
- mkdir -p "$d"
- cat "$2" >"$d/$1"
- ;;
- *)
- for i in "banned" "unhealthy" ; do
- rm -f "$d/$i"
- done
- ;;
- esac
-}
-
##################################################################
# Reconfigure a service on demand
@@ -1031,17 +994,7 @@ service_stop ()
ctdb_standard_event_handler ()
{
- case "$1" in
- status)
- ctdb_checkstatus
- exit
- ;;
- setstatus)
- shift
- ctdb_setstatus "$@"
- exit
- ;;
- esac
+ :
}
iptables_wrapper ()