config: add CTDB_PARTIALLY_ONLINE_INTERFACES to ctdb.sysconfig
authorStefan Metzmacher <metze@samba.org>
Mon, 21 Dec 2009 13:02:03 +0000 (14:02 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 20 Jan 2010 10:11:01 +0000 (11:11 +0100)
With this option set to "yes", we don't become unhealthy
as long as at least one interface is still available.

metze

config/ctdb.sysconfig
config/events.d/10.interface

index b1ac164ce1d7f50f2b72d0ebe085465a3e5c1835..a19dd0ee7cc39f43e3f6a47ffbe373d29cf5bbde 100644 (file)
@@ -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
index b9637edf4b56c0f88a66d9b1113abd19be4b989f..806354921c10c7dd33f6c92b5d17e5e733e4fa0e 100755 (executable)
@@ -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;
        }