From 5bfbc5898389c969c03938238db880d6dd3fe81f Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Mon, 17 Jul 2023 08:48:41 +0200 Subject: [PATCH 1/3] keepalived: update to version 2.2.8 See release-notes: https://www.keepalived.org/release-notes/Release-2.2.8.html Signed-off-by: Florian Eckert --- net/keepalived/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/keepalived/Makefile b/net/keepalived/Makefile index 217b12c13..9ef1a0349 100644 --- a/net/keepalived/Makefile +++ b/net/keepalived/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=keepalived -PKG_VERSION:=2.2.7 -PKG_RELEASE:=10 +PKG_VERSION:=2.2.8 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://www.keepalived.org/software -PKG_HASH:=c61940d874154a560a54627ecf7ef47adebdf832164368d10bf242a4d9b7d49d +PKG_HASH:=85882eb62974f395d4c631be990a41a839594a7e62fbfebcb5649a937a7a1bb6 PKG_CPE_ID:=cpe:/a:keepalived:keepalived PKG_LICENSE:=GPL-2.0-or-later From 5462d06ba86ff728850e621b789556da32d5432e Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 10 Nov 2022 15:11:04 +0100 Subject: [PATCH 2/3] keepalived: add PING_CHECK to real_server Signed-off-by: Florian Eckert --- net/keepalived/Makefile | 2 +- net/keepalived/files/keepalived.init | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/net/keepalived/Makefile b/net/keepalived/Makefile index 9ef1a0349..3ca584a37 100644 --- a/net/keepalived/Makefile +++ b/net/keepalived/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=keepalived PKG_VERSION:=2.2.8 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://www.keepalived.org/software diff --git a/net/keepalived/files/keepalived.init b/net/keepalived/files/keepalived.init index b13f10c40..77f1e1778 100644 --- a/net/keepalived/files/keepalived.init +++ b/net/keepalived/files/keepalived.init @@ -502,6 +502,10 @@ real_server() { printf '%breal_server %s %d {\n' "${INDENT_1}" "$ipaddr" "$port" >> "$KEEPALIVED_CONF" printf '%bweight %d\n' "${INDENT_2}" "$weight" >> "$KEEPALIVED_CONF" case "$check" in + PING_CHECK) + printf '%b%s {\n' "${INDENT_2}" "$check" >> "$KEEPALIVED_CONF" + printf '%b}\n' "${INDENT_2}" >> "$KEEPALIVED_CONF" + ;; TCP_CHECK) printf '%b%s {\n' "${INDENT_2}" "$check" >> "$KEEPALIVED_CONF" print_elems_indent "$1" "$INDENT_3" connect_timeout \ From 09f20658d9d7d2b561dae225f1701e1b0eb90737 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 10 Nov 2022 15:04:11 +0100 Subject: [PATCH 3/3] keepalived: add notify_up and notify_down for virtual server Signed-off-by: Florian Eckert --- net/keepalived/Makefile | 2 +- net/keepalived/files/keepalived.init | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/net/keepalived/Makefile b/net/keepalived/Makefile index 3ca584a37..62f4373f7 100644 --- a/net/keepalived/Makefile +++ b/net/keepalived/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=keepalived PKG_VERSION:=2.2.8 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://www.keepalived.org/software diff --git a/net/keepalived/files/keepalived.init b/net/keepalived/files/keepalived.init index 77f1e1778..63beb2983 100644 --- a/net/keepalived/files/keepalived.init +++ b/net/keepalived/files/keepalived.init @@ -88,8 +88,11 @@ print_notify() { shift local name="$1" shift + local indent="$1" + shift + for notify in "$@"; do - printf '%b%s' "${INDENT_1}" "$notify">> "$KEEPALIVED_CONF" + printf '%b%s' "${indent}" "$notify">> "$KEEPALIVED_CONF" notify="$(echo "$notify" | tr 'a-z' 'A-Z')" printf ' "/bin/busybox env -i ACTION=%s TYPE=%s NAME=%s /sbin/hotplug-call keepalived"\n' "$notify" "$type" "$name" >> "$KEEPALIVED_CONF" done @@ -320,7 +323,7 @@ vrrp_sync_group() { print_elems_indent "$1" "$INDENT_1" no_val_smtp_alert no_val_global_tracking - print_notify "GROUP" "$name" notify_backup notify_master \ + print_notify "GROUP" "$name" "$INDENT_1" notify_backup notify_master \ notify_fault notify config_section_close @@ -352,7 +355,7 @@ vrrp_instance() { no_val_dont_track_primary no_val_smtp_alert no_val_nopreempt \ no_val_use_vmac - print_notify "INSTANCE" "$name" notify_backup notify_master \ + print_notify "INSTANCE" "$name" "$INDENT_1" notify_backup notify_master \ notify_fault notify_stop # Handle virtual_ipaddress & virtual_ipaddress_excluded lists @@ -501,6 +504,7 @@ real_server() { [ -n "$ipaddr" ] && [ -n "$port" ] && { printf '%breal_server %s %d {\n' "${INDENT_1}" "$ipaddr" "$port" >> "$KEEPALIVED_CONF" printf '%bweight %d\n' "${INDENT_2}" "$weight" >> "$KEEPALIVED_CONF" + print_notify "REAL_SERVER" "$name" "$INDENT_2" notify_up notify_down case "$check" in PING_CHECK) printf '%b%s {\n' "${INDENT_2}" "$check" >> "$KEEPALIVED_CONF"