2 # event script to integrate with gpfs cnfs
4 [ -n "$CTDB_BASE" ] || \
5 export CTDB_BASE
=$
(cd -P $
(dirname "$0") ; dirname "$PWD")
11 ctdb_setup_service_state_dir
"gpfs"
14 mkdir
-p "$service_state_dir/fs"
16 [ -f "$service_state_dir/gpfsnoquorum" ] && {
17 logger No GPFS quorum. Node is UNHEALTHY
18 $CTDB_BASE/events.d
/62.cnfs unhealthy
"No GPFS quorum. Nodfe is UNHEALTHY."
22 logger All required GPFS resources are available. CNFS part is healthy.
23 $CTDB_BASE/events.d
/62.cnfs healthy
33 rm -f "$service_state_dir/gpfsnoquorum"
34 logger
"GPFS quorum has been reached."
39 touch "$service_state_dir/gpfsnoquorum"
40 logger
"GPFS quorum has been lost."
41 $CTDB_BASE/events.d
/62.cnfs unhealthy
"GPFS quorum was lost! Marking node as UNHEALTHY."
45 # Mark the node as UNHEALTHY which means all public addresses
46 # will be migrated off the node.
48 echo "$*" | ctdb_setstatus unhealthy
-
50 # force a monitor event so we pick up immediately that this script
51 # will now fail and make the node unhealthy.
52 ctdb eventscript monitor
54 # Wait until we no longer serve any ip addresses at all
56 while ctdb
-X ip |
grep -q "^|.*|${pnn}|\$" ; do
62 # mark the node as healthy
63 ctdb_setstatus healthy
73 ctdb_standard_event_handler
"$@"