From c2fa136a3589c30d98cffa49c9dd7682c81c2002 Mon Sep 17 00:00:00 2001 From: Nataliia Solomko Date: Mon, 27 Apr 2026 16:10:26 +0300 Subject: T8293: Add ability to set timeout for high-availability health-check Setting a timeout allows VRRP health-check scripts to run longer than the set interval. Without timeout, keepalived considers the script as failed after interval seconds. With timeout set higher than interval, the script has more time to complete before being marked as failed and transitioning VRRP to FAULT state. --- data/templates/high-availability/keepalived.conf.j2 | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'data') diff --git a/data/templates/high-availability/keepalived.conf.j2 b/data/templates/high-availability/keepalived.conf.j2 index f0ed7909c..a45befdb6 100644 --- a/data/templates/high-availability/keepalived.conf.j2 +++ b/data/templates/high-availability/keepalived.conf.j2 @@ -47,6 +47,9 @@ vrrp_script healthcheck_sg_{{ name }} { script "/usr/bin/ping -c1 {{ sync_group_config.health_check.ping }}" {% endif %} interval {{ sync_group_config.health_check.interval }} +{% if sync_group_config.health_check.timeout is vyos_defined %} + timeout {{ sync_group_config.health_check.timeout }} +{% endif %} fall {{ sync_group_config.health_check.failure_count }} rise 1 } @@ -64,6 +67,9 @@ vrrp_script healthcheck_{{ name }} { script "/usr/bin/ping -c1 {{ group_config.health_check.ping }}" {% endif %} interval {{ group_config.health_check.interval }} +{% if group_config.health_check.timeout is vyos_defined %} + timeout {{ group_config.health_check.timeout }} +{% endif %} fall {{ group_config.health_check.failure_count }} rise 1 } -- cgit v1.2.3