1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

config: add CTDB_MAX_PERSISTENT_CHECK_ERRORS option

metze

(This used to be ctdb commit fc5f556d488488040303438aefecb5ae2a8e54bc)
This commit is contained in:
Stefan Metzmacher 2009-12-07 10:53:31 +01:00
parent 0c735f03d4
commit 96977cc5c4
2 changed files with 17 additions and 0 deletions

View File

@ -103,6 +103,7 @@ build_ctdb_options () {
maybe_set "--lvs --single-public-ip" "$CTDB_LVS_PUBLIC_IP"
maybe_set "--script-log-level" "$CTDB_SCRIPT_LOG_LEVEL"
maybe_set "--syslog" "$CTDB_SYSLOG" "yes"
maybe_set "--max-persistent-check-errors" "$CTDB_MAX_PERSISTENT_CHECK_ERRORS"
}
check_tdb () {
@ -132,6 +133,14 @@ check_tdb () {
check_persistent_databases () {
PERSISTENT_DB_DIR="${CTDB_DBDIR:-/var/ctdb}/persistent"
mkdir -p $PERSISTENT_DB_DIR 2>/dev/null
local ERRCOUNT=$CTDB_MAX_PERSISTENT_CHECK_ERRORS
test -z "$ERRCOUNT" && {
ERRCOUNT="0"
}
test x"$ERRCOUNT" != x"0" && {
return 0;
}
for PDBASE in `ls $PERSISTENT_DB_DIR/*.tdb.[0-9] 2>/dev/null`; do
check_tdb $PDBASE || {
echo "Persistent database $PDBASE is corrupted! CTDB will not start."

View File

@ -200,6 +200,14 @@ CTDB_DEBUGLEVEL=ERR
# The default is "no".
# CTDB_RUN_TIMEOUT_MONITOR=no
# Should ctdbd start with corrupted/unhealthy persistent databases?
# This parameter specifies the max error count for persistent health
# checks before the "startup" event. The value must be a positive
# interger value, "0" or "-1".
# The default is "0", which means ctdbd will not start.
# "-1" means wait forever.
# CTDB_MAX_PERSISTENT_CHECK_ERRORS=0
# set any default tuning options for ctdb
# use CTDB_SET_XXXX=value where XXXX is the name of the tuning
# variable