summaryrefslogtreecommitdiff
path: root/data/templates/vrrp/keepalived.conf.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-12-25 22:13:12 +0100
committerGitHub <noreply@github.com>2021-12-25 22:13:12 +0100
commit2b891ab8df43aadccc56c14183607e90d0f6f381 (patch)
treea86d23ffc22dfd6dab44a8c21ea1a2a5b3f70638 /data/templates/vrrp/keepalived.conf.tmpl
parent4abca54698edb09b76e7d059dd35cdcef3512ec4 (diff)
parentee2c382c7c740bc61d4eee184d7fddb1a6a8bbdc (diff)
downloadvyos-1x-2b891ab8df43aadccc56c14183607e90d0f6f381.tar.gz
vyos-1x-2b891ab8df43aadccc56c14183607e90d0f6f381.zip
Merge pull request #1115 from sever-sever/T4081
keepalived: T4081: Fix health-checking when syn-group is used
Diffstat (limited to 'data/templates/vrrp/keepalived.conf.tmpl')
-rw-r--r--data/templates/vrrp/keepalived.conf.tmpl15
1 files changed, 12 insertions, 3 deletions
diff --git a/data/templates/vrrp/keepalived.conf.tmpl b/data/templates/vrrp/keepalived.conf.tmpl
index b93aa4bc9..6585fc60b 100644
--- a/data/templates/vrrp/keepalived.conf.tmpl
+++ b/data/templates/vrrp/keepalived.conf.tmpl
@@ -83,15 +83,24 @@ vrrp_instance {{ name }} {
{% endif %}
{% if sync_group is defined and sync_group is not none %}
-{% for name, group_config in sync_group.items() if group_config.disable is not defined %}
+{% for name, sync_group_config in sync_group.items() if sync_group_config.disable is not defined %}
vrrp_sync_group {{ name }} {
group {
-{% if group_config.member is defined and group_config.member is not none %}
-{% for member in group_config.member %}
+{% if sync_group_config.member is defined and sync_group_config.member is not none %}
+{% for member in sync_group_config.member %}
{{ member }}
{% endfor %}
{% endif %}
}
+
+{# Health-check scripts should be in section sync-group if member is part of the sync-group T4081 #}
+{% for name, group_config in group.items() if group_config.disable is not defined %}
+{% if group_config.health_check is defined and group_config.health_check.script is defined and group_config.health_check.script is not none and name in sync_group_config.member %}
+ track_script {
+ healthcheck_{{ name }}
+ }
+{% endif %}
+{% endfor %}
{% if conntrack_sync_group is defined and conntrack_sync_group == name %}
{% set vyos_helper = "/usr/libexec/vyos/vyos-vrrp-conntracksync.sh" %}
notify_master "{{ vyos_helper }} master {{ name }}"