diff options
author | Martin Schwenke <martin@meltin.net> | 2011-08-10 15:32:58 +1000 |
---|---|---|
committer | Martin Schwenke <martin@meltin.net> | 2011-08-10 15:32:58 +1000 |
commit | 06f1004da48149ae9422ec4a8e0ce0694f31b42b (patch) | |
tree | 2e7368de5b2136137c41bd550ee144c2c5ed4b17 | |
parent | f36bae1cbf710cd8b9410c72a5eed6c558275936 (diff) | |
parent | 383b203096173a5006de028bd236a6e7c70f6649 (diff) | |
download | samba-06f1004da48149ae9422ec4a8e0ce0694f31b42b.tar.gz samba-06f1004da48149ae9422ec4a8e0ce0694f31b42b.tar.xz samba-06f1004da48149ae9422ec4a8e0ce0694f31b42b.zip |
Merge branch 'eventscript.20.multipathd' into eventscript.00.ctdb
(This used to be ctdb commit 8723b88b0b2bbeece38c74c77c50e8d8b3e2d5ca)
-rwxr-xr-x | ctdb/config/events.d/13.per_ip_routing | 4 | ||||
-rwxr-xr-x | ctdb/config/events.d/20.multipathd | 11 | ||||
-rwxr-xr-x | ctdb/config/events.d/62.cnfs | 14 |
3 files changed, 11 insertions, 18 deletions
diff --git a/ctdb/config/events.d/13.per_ip_routing b/ctdb/config/events.d/13.per_ip_routing index a0df119895..ff4dbdb8c3 100755 --- a/ctdb/config/events.d/13.per_ip_routing +++ b/ctdb/config/events.d/13.per_ip_routing @@ -3,8 +3,10 @@ . $CTDB_BASE/functions loadconfig +ctdb_setup_service_state_dir "per_ip_routing" + [ -z "$CTDB_PER_IP_ROUTING_STATE" ] && { - CTDB_PER_IP_ROUTING_STATE="$CTDB_VARDIR/state/per_ip_routing" + CTDB_PER_IP_ROUTING_STATE="$service_state_dir" } AUTO_LINK_LOCAL="no" diff --git a/ctdb/config/events.d/20.multipathd b/ctdb/config/events.d/20.multipathd index 73b6054f44..1bf7070fb5 100755 --- a/ctdb/config/events.d/20.multipathd +++ b/ctdb/config/events.d/20.multipathd @@ -16,7 +16,9 @@ loadconfig exit 0 } -MPFAILURE=$CTDB_VARDIR/state/multipathd/failure +ctdb_setup_service_state_dir + +MPFAILURE="$service_state_dir/failure" multipathd_check_background() { @@ -75,13 +77,6 @@ multipathd_check() } case "$1" in - startup) - # create a state directory to keep/track the multipath device - # state - mkdir -p $CTDB_VARDIR/state/multipathd - exit 0 - ;; - monitor) multipathd_check [ "$?" = "0" ] || { diff --git a/ctdb/config/events.d/62.cnfs b/ctdb/config/events.d/62.cnfs index af4ecc3b7a..3cc56e3955 100755 --- a/ctdb/config/events.d/62.cnfs +++ b/ctdb/config/events.d/62.cnfs @@ -5,13 +5,12 @@ loadconfig -STATEDIR=$CTDB_VARDIR/state/gpfs - +ctdb_setup_service_state_dir "gpfs" check_if_healthy() { - mkdir -p $STATEDIR/fs + mkdir -p "$service_state_dir/fs" - [ -f "$STATEDIR/gpfsnoquorum" ] && { + [ -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 @@ -23,21 +22,18 @@ check_if_healthy() { case "$1" in startup) - mkdir -p $STATEDIR check_if_healthy ;; gpfsquorumreached) - mkdir -p $STATEDIR - rm -f "$STATEDIR/gpfsnoquorum" + rm -f "$service_state_dir/gpfsnoquorum" logger "GPFS quorum has been reached." check_if_healthy ;; gpfsquorumloss) - mkdir -p $STATEDIR - touch "$STATEDIR/gpfsnoquorum" + 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." ;; |