From 50bff8c8865cb82c28459bc4d1aea574b21983c4 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 21 Dec 2009 14:02:03 +0100 Subject: config: add CTDB_PARTIALLY_ONLINE_INTERFACES to ctdb.sysconfig With this option set to "yes", we don't become unhealthy as long as at least one interface is still available. metze (This used to be ctdb commit d054eb33c6ae92560cddb40732e5dcf622591a3c) --- ctdb/config/ctdb.sysconfig | 10 ++++++++++ ctdb/config/events.d/10.interface | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/ctdb/config/ctdb.sysconfig b/ctdb/config/ctdb.sysconfig index b1ac164ce1d..a19dd0ee7cc 100644 --- a/ctdb/config/ctdb.sysconfig +++ b/ctdb/config/ctdb.sysconfig @@ -228,6 +228,16 @@ CTDB_RECOVERY_LOCK="/some/place/on/shared/storage" # CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=250 # CTDB_PER_IP_ROUTING_RULE_PREF=10000 +# Make offline interfaces not a reason for being UNHEALTHY. +# The CTDB_PARTIALLY_ONLINE_INTERFACES option changes +# the behavior of the 10.interface monitor event. +# In some setups it's desired that interfaces without +# an active link don't change the node to unhealthy. +# ctdbd is just informed about the interface status +# and "ctdb status" dislays the node as "PARTIALLYONLINE". +# +# CTDB_PARTIALLY_ONLINE_INTERFACES="yes" + # where to log messages # the default is /var/log/log.ctdb # CTDB_LOGFILE=/var/log/log.ctdb diff --git a/ctdb/config/events.d/10.interface b/ctdb/config/events.d/10.interface index b9637edf4b5..806354921c1 100755 --- a/ctdb/config/events.d/10.interface +++ b/ctdb/config/events.d/10.interface @@ -227,6 +227,15 @@ case "$1" in monitor_interfaces ret=$? + test x"$ret" = x"2" && { + test x"$CTDB_PARTIALLY_ONLINE_INTERFACES" != x"yes" && { + exit 1; + } + # as long as we have one interface available don't become + # unhealthy + ret=0 + } + test x"$ret" != x"0" && { exit 1; } -- cgit