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 () {
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."
# 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