summaryrefslogtreecommitdiff
path: root/data/templates/high-availability/keepalived.conf.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-01-06 09:25:43 +0100
committerChristian Poessinger <christian@poessinger.com>2022-01-06 09:25:43 +0100
commit0a91c5de32b52235f4c9c12a6ec34c017011c3df (patch)
treeb7e175ee98bf3f2d8e2c59d87c46b0bb92a9cb4a /data/templates/high-availability/keepalived.conf.tmpl
parent5b8550dc18378573f6b316d7ff4bd43a9061e668 (diff)
downloadvyos-1x-0a91c5de32b52235f4c9c12a6ec34c017011c3df.tar.gz
vyos-1x-0a91c5de32b52235f4c9c12a6ec34c017011c3df.zip
vrrp: T4141: bugfix missing {% if %} clause when adding sync-groups
Diffstat (limited to 'data/templates/high-availability/keepalived.conf.tmpl')
-rw-r--r--data/templates/high-availability/keepalived.conf.tmpl8
1 files changed, 5 insertions, 3 deletions
diff --git a/data/templates/high-availability/keepalived.conf.tmpl b/data/templates/high-availability/keepalived.conf.tmpl
index 817c65ff0..afd5f5383 100644
--- a/data/templates/high-availability/keepalived.conf.tmpl
+++ b/data/templates/high-availability/keepalived.conf.tmpl
@@ -94,13 +94,15 @@ vrrp_sync_group {{ name }} {
}
{# Health-check scripts should be in section sync-group if member is part of the sync-group T4081 #}
-{% for name, group_config in vrrp.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 %}
+{% if vrrp is defined and vrrp.group is defined and vrrp.group is not none %}
+{% for name, group_config in vrrp.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 %}
{% endif %}
-{% endfor %}
{% if vrrp.conntrack_sync_group is defined and vrrp.conntrack_sync_group == name %}
{% set vyos_helper = "/usr/libexec/vyos/vyos-vrrp-conntracksync.sh" %}
notify_master "{{ vyos_helper }} master {{ name }}"