mirror of
https://github.com/samba-team/samba.git
synced 2025-03-26 18:50:30 +03:00
Merge branch 'eventscript.20.multipathd' into eventscript.00.ctdb
(This used to be ctdb commit 8723b88b0b2bbeece38c74c77c50e8d8b3e2d5ca)
This commit is contained in:
commit
06f1004da4
@ -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"
|
||||
|
@ -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" ] || {
|
||||
|
@ -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."
|
||||
;;
|
||||
|
Loading…
x
Reference in New Issue
Block a user