From 49234912119c224bf4c28df5573937668d03e651 Mon Sep 17 00:00:00 2001 From: Viacheslav Hletenko Date: Mon, 2 Jan 2023 18:51:47 +0000 Subject: T4904: keepalived virtual-server allow multiple ports with fwmark Allow multiple ports for high-availability virtual-server The current implementation allows balance only one "virtual" address and port between between several "real servers" Allow matching "fwmark" to set traffic which should be balanced Allow to set port 0 (all traffic) if we use "fwmark" Add health-check script set high-availability virtual-server 203.0.113.1 fwmark '111' set high-availability virtual-server 203.0.113.1 real-server 192.0.2.11 health-check script '/bin/true' set high-availability virtual-server 203.0.113.1 real-server 192.0.2.11 port '0' --- interface-definitions/high-availability.xml.in | 20 ++++++++++++++++++-- interface-definitions/include/firewall/fwmark.xml.i | 14 ++++++++++++++ .../include/port-number-start-zero.xml.i | 15 +++++++++++++++ 3 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 interface-definitions/include/firewall/fwmark.xml.i create mode 100644 interface-definitions/include/port-number-start-zero.xml.i (limited to 'interface-definitions') diff --git a/interface-definitions/high-availability.xml.in b/interface-definitions/high-availability.xml.in index 784e51151..d67a142d1 100644 --- a/interface-definitions/high-availability.xml.in +++ b/interface-definitions/high-availability.xml.in @@ -365,7 +365,8 @@ nat - #include + #include + #include Timeout for persistent connections @@ -404,7 +405,7 @@ Real server address - #include + #include Server connection timeout @@ -417,6 +418,21 @@ + + + Health check script + + + + + Health check script file + + + + + + + diff --git a/interface-definitions/include/firewall/fwmark.xml.i b/interface-definitions/include/firewall/fwmark.xml.i new file mode 100644 index 000000000..4607ef58f --- /dev/null +++ b/interface-definitions/include/firewall/fwmark.xml.i @@ -0,0 +1,14 @@ + + + + Match fwmark value + + u32:1-2147483647 + Match firewall mark value + + + + + + + diff --git a/interface-definitions/include/port-number-start-zero.xml.i b/interface-definitions/include/port-number-start-zero.xml.i new file mode 100644 index 000000000..04a144216 --- /dev/null +++ b/interface-definitions/include/port-number-start-zero.xml.i @@ -0,0 +1,15 @@ + + + + Port number used by connection + + u32:0-65535 + Numeric IP port + + + + + Port number must be in range 0 to 65535 + + + -- cgit v1.2.3