diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-01-06 09:25:43 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-01-06 19:44:58 +0100 |
commit | 5b9edbc220dec7aefd79a39da3f8f6ab6f34007c (patch) | |
tree | e2f40c751e6768d88ebd1a6026ec7f1be56de31e /data/templates/vrrp | |
parent | 64349844b98fb178956b64871135975518782adc (diff) | |
download | vyos-1x-5b9edbc220dec7aefd79a39da3f8f6ab6f34007c.tar.gz vyos-1x-5b9edbc220dec7aefd79a39da3f8f6ab6f34007c.zip |
vrrp: T4141: bugfix missing {% if %} clause when adding sync-groups
(cherry picked from commit 0a91c5de32b52235f4c9c12a6ec34c017011c3df)
Diffstat (limited to 'data/templates/vrrp')
-rw-r--r-- | data/templates/vrrp/keepalived.conf.tmpl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/data/templates/vrrp/keepalived.conf.tmpl b/data/templates/vrrp/keepalived.conf.tmpl index 5e5674a6d..afbdc978e 100644 --- a/data/templates/vrrp/keepalived.conf.tmpl +++ b/data/templates/vrrp/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 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 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 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 }}" |