From 4f5791ebd03eaec1c7da0865a383175b05102712 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 5 May 2024 19:47:29 +0200 Subject: Adding upstream version 2:4.17.12+dfsg. Signed-off-by: Daniel Baumann --- ctdb/tests/UNIT/eventscripts/scripts/91.lvs.sh | 76 ++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 ctdb/tests/UNIT/eventscripts/scripts/91.lvs.sh (limited to 'ctdb/tests/UNIT/eventscripts/scripts/91.lvs.sh') diff --git a/ctdb/tests/UNIT/eventscripts/scripts/91.lvs.sh b/ctdb/tests/UNIT/eventscripts/scripts/91.lvs.sh new file mode 100644 index 0000000..a8104eb --- /dev/null +++ b/ctdb/tests/UNIT/eventscripts/scripts/91.lvs.sh @@ -0,0 +1,76 @@ +setup () +{ + _ip="$1" + _iface="$2" + + export FAKE_LVS_STATE_DIR="${FAKE_NETWORK_STATE}/lvs" + mkdir -p "$FAKE_LVS_STATE_DIR" + + lvs_header=$(ipvsadm -l -n) + + [ -n "$_ip" ] || return 0 + [ -n "$_iface" ] || return 0 + + setup_script_options <"$CTDB_LVS_NODES" +} + +check_ipvsadm () +{ + if [ "$1" = "NULL" ] ; then + required_result 0 < mtu 65536 qdisc noqueue state UNKNOWN + link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 +EOF + else + required_result 0 < mtu 65536 qdisc noqueue state UNKNOWN + link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 + inet ${CTDB_LVS_PUBLIC_IP}/32 scope ${_scope} lo + valid_lft forever preferred_lft forever +EOF + fi + + simple_test_command ip addr show dev lo +} -- cgit v1.2.3