From: Martin Schwenke Date: Thu, 14 Apr 2016 03:35:07 +0000 (+1000) Subject: ctdb-scripts: Add monitoring of CTDB_LVS_PUBLIC_IFACE X-Git-Tag: talloc-2.1.7~247 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a92394e69ce08f2b49f09ef0be1f56a4a6004ed1;p=thirdparty%2Fsamba.git ctdb-scripts: Add monitoring of CTDB_LVS_PUBLIC_IFACE ... and unit tests. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/config/events.d/91.lvs b/ctdb/config/events.d/91.lvs index 9fe38de8dac..528121ed44a 100755 --- a/ctdb/config/events.d/91.lvs +++ b/ctdb/config/events.d/91.lvs @@ -114,6 +114,14 @@ ipreallocated) flush_route_cache ;; + +monitor) + lvs_check_config + + if [ -n "$CTDB_LVS_PUBLIC_IFACE" ] ; then + interface_monitor "$CTDB_LVS_PUBLIC_IFACE" || exit 1 + fi + ;; esac exit 0 diff --git a/ctdb/tests/eventscripts/91.lvs.monitor.001.sh b/ctdb/tests/eventscripts/91.lvs.monitor.001.sh new file mode 100755 index 00000000000..3710d85f314 --- /dev/null +++ b/ctdb/tests/eventscripts/91.lvs.monitor.001.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +. "${TEST_SCRIPTS_DIR}/unit.sh" + +define_test "not configured" + +setup_ctdb +setup_ctdb_lvs <