diff options
author | Martin Schwenke <martin@meltin.net> | 2015-08-10 15:34:29 +1000 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2015-09-15 08:56:20 +0200 |
commit | 8c2948eba59d4ee24af1154c774c9fa79939bd91 (patch) | |
tree | f9995c625c19aa75879b3b278eb89c63ae11b025 /ctdb/config/events.d | |
parent | 9d49dfac5f336499131fca5143f0ffdb1932afc9 (diff) | |
download | samba-8c2948eba59d4ee24af1154c774c9fa79939bd91.tar.gz |
ctdb-scripts: Drop 62.cnfs eventscript
To get a similar effect just do something like this:
mmaddcallback ctdb-disable-on-quorumLoss \
--command /usr/bin/ctdb \
--event quorumLoss --parms "disable"
mmaddcallback ctdb-enable-on-quorumReached \
--command /usr/bin/ctdb \
--event quorumReached --parms "enable"
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/events.d')
-rwxr-xr-x | ctdb/config/events.d/62.cnfs | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/ctdb/config/events.d/62.cnfs b/ctdb/config/events.d/62.cnfs deleted file mode 100755 index 339eaef3cb0..00000000000 --- a/ctdb/config/events.d/62.cnfs +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/sh -# event script to integrate with gpfs cnfs - -[ -n "$CTDB_BASE" ] || \ - export CTDB_BASE=$(cd -P $(dirname "$0") ; dirname "$PWD") - -. $CTDB_BASE/functions - -loadconfig - -ctdb_setup_service_state_dir "gpfs" - -check_if_healthy() { - mkdir -p "$service_state_dir/fs" - - [ -f "$service_state_dir/gpfsnoquorum" ] && { - logger No GPFS quorum. Node is UNHEALTHY - $CTDB_BASE/events.d/62.cnfs unhealthy "No GPFS quorum. Nodfe is UNHEALTHY." - exit 0 - } - - logger All required GPFS resources are available. CNFS part is healthy. - $CTDB_BASE/events.d/62.cnfs healthy -} - -case "$1" in - startup) - check_if_healthy - ;; - - - gpfsquorumreached) - rm -f "$service_state_dir/gpfsnoquorum" - logger "GPFS quorum has been reached." - check_if_healthy - ;; - - gpfsquorumloss) - touch "$service_state_dir/gpfsnoquorum" - logger "GPFS quorum has been lost." - $CTDB_BASE/events.d/62.cnfs unhealthy "GPFS quorum was lost! Marking node as UNHEALTHY." - ;; - - unhealthy) - # Mark the node as UNHEALTHY which means all public addresses - # will be migrated off the node. - shift - echo "$*" | ctdb_setstatus unhealthy - - - # force a monitor event so we pick up immediately that this script - # will now fail and make the node unhealthy. - ctdb eventscript monitor - - # Wait until we no longer serve any ip addresses at all - ctdb_get_pnn - while ctdb -X ip | grep -q "^|.*|${pnn}|\$" ; do - sleep 1 - done - ;; - - healthy) - # mark the node as healthy - ctdb_setstatus healthy - ;; - - - monitor) - ctdb_checkstatus - exit $? - ;; - - *) - ctdb_standard_event_handler "$@" - ;; -esac - -exit 0 - |