summaryrefslogtreecommitdiffstats
path: root/ctdb
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronniesahlberg@gmail.com>2010-10-18 11:57:38 +1100
committerRonnie Sahlberg <ronniesahlberg@gmail.com>2011-02-18 10:11:56 +1100
commitd32a4dd50165f69c1f7bbff15b0bcd2c21fb2a2b (patch)
tree06dffe877fc00f1ecfca9b3184cea7c8a3df18d8 /ctdb
parentef0ab7eee15f121e14b639562747a8a2f4b0d7eb (diff)
remove checking for filesystems and filesystem health from the cnfs script.
remove the gpfsmount and gpfsumount entry points (This used to be ctdb commit 7db5a4832a9555be53c301f198f72b9e075a8ae7)
Diffstat (limited to 'ctdb')
-rwxr-xr-xctdb/config/events.d/62.cnfs74
1 files changed, 0 insertions, 74 deletions
diff --git a/ctdb/config/events.d/62.cnfs b/ctdb/config/events.d/62.cnfs
index e0af722f4e..af4ecc3b7a 100755
--- a/ctdb/config/events.d/62.cnfs
+++ b/ctdb/config/events.d/62.cnfs
@@ -8,20 +8,8 @@ loadconfig
STATEDIR=$CTDB_VARDIR/state/gpfs
-# filesystems needed by nfs
-NFS_FSS=`cat /etc/exports | egrep -v "^#" | sed -e "s/[ \t]*[^ \t]*$//" -e "s/\"//g"`
-
-
-
check_if_healthy() {
mkdir -p $STATEDIR/fs
- FS=`(cd $STATEDIR/fs ; ls )`
- [ -z "$FS" ] || {
- MISSING=`echo $FS | sed -e "s/@/\//g"`
- logger Filesystems required for NFS are missing. Node is UNHEALTHY. [$MISSING]
- $CTDB_BASE/events.d/62.cnfs unhealthy "GPFS filesystems required for NFS are not mounted : [$MISSING]"
- exit 0
- }
[ -f "$STATEDIR/gpfsnoquorum" ] && {
logger No GPFS quorum. Node is UNHEALTHY
@@ -40,64 +28,6 @@ case "$1" in
;;
- # This event is called from the GPFS callbacks when a filesystem is
- # unmounted
- gpfsumount)
- # is this a filesystem we need for nfs?
- echo "$NFS_FSS" | egrep "^$2" >/dev/null || {
- # no
- exit 0
- }
-
- logger "GPFS unmounted filesystem $2 used by NFS. Mark node as UNHEALTHY"
-
- MFS=`echo $2 | sed -e "s/\//@/g"`
- mkdir -p $STATEDIR/fs
- touch "$STATEDIR/fs/$MFS"
- $CTDB_BASE/events.d/62.cnfs unhealthy "GPFS unmounted filesystem $2 used by NFS"
- ;;
-
- # This event is called from the GPFS callbacks when a filesystem is
- # mounted
- gpfsmount)
- # is this a filesystem we need for nfs?
- echo "$NFS_FSS" | egrep "^$2" >/dev/null || {
- # no
- exit 0
- }
-
- logger "GPFS mounted filesystem $2 used by NFS."
-
- MFS=`echo $2 | sed -e "s/\//@/g"`
- mkdir -p $STATEDIR/fs
- rm -f "$STATEDIR/fs/$MFS"
-
- check_if_healthy
- ;;
-
-
-
- # This event is called from the gpfs callback when GPFS is being shutdown.
- gpfsshutdown)
- logger "GPFS is shutting down. Marking node as UNHEALTHY and trigger a CTDB failover"
- $CTDB_BASE/events.d/62.cnfs unhealthy "GPFS was shut down!"
- ;;
-
-
- # This event is called from the gpfs callback when GPFS has started.
- # It checks that all required NFS filesystems are mounted
- # and flags the node healthy if so.
- gpfsstartup)
- # assume we always have quorum when starting
- # we are only interested in the case when we explicitely
- # lost quorum in an otherwise happy cluster
- mkdir -p $STATEDIR
- rm -f "$STATEDIR/gpfsnoquorum"
- logger "GPFS is is started."
- check_if_healthy
- ;;
-
-
gpfsquorumreached)
mkdir -p $STATEDIR
rm -f "$STATEDIR/gpfsnoquorum"
@@ -112,10 +42,6 @@ case "$1" in
$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.