summaryrefslogtreecommitdiff
path: root/src/conf_mode/high-availability.py
diff options
context:
space:
mode:
authorkhramshinr <khramshinr@gmail.com>2024-03-01 12:39:28 +0800
committerkhramshinr <khramshinr@gmail.com>2024-03-01 12:39:28 +0800
commitef5c61b26e60a85768a0c6c0677e38fc238d1c29 (patch)
tree20b0307dd283c84eca8a32d4b7ab220b69704e6b /src/conf_mode/high-availability.py
parent2943d9bb0f65fb9c1a605b9c1906c25ae827a656 (diff)
parentc095867d873a9a7dde038bb751ba26edc66b99f7 (diff)
downloadvyos-1x-ef5c61b26e60a85768a0c6c0677e38fc238d1c29.tar.gz
vyos-1x-ef5c61b26e60a85768a0c6c0677e38fc238d1c29.zip
vrrp: T6020: vrrp health-check script not applied correctly in keepalived.conf
Added health-check to sync-group in CLI Don't use instance health-check when instance in sync group member Disallow wrong healtch-check configurations New smoke test
Diffstat (limited to 'src/conf_mode/high-availability.py')
-rwxr-xr-xsrc/conf_mode/high-availability.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/conf_mode/high-availability.py b/src/conf_mode/high-availability.py
index 7f8849de9..c726db8b2 100755
--- a/src/conf_mode/high-availability.py
+++ b/src/conf_mode/high-availability.py
@@ -116,8 +116,9 @@ def verify(ha):
raise ConfigError(f'VRRP group "{group}" uses IPv4 but hello-source-address is IPv6!')
if 'peer_address' in group_config:
- if is_ipv6(group_config['peer_address']):
- raise ConfigError(f'VRRP group "{group}" uses IPv4 but peer-address is IPv6!')
+ for peer_address in group_config['peer_address']:
+ if is_ipv6(peer_address):
+ raise ConfigError(f'VRRP group "{group}" uses IPv4 but peer-address is IPv6!')
if vaddrs6:
tmp = {'interface': interface, 'vrid': vrid, 'ipver': 'IPv6'}
@@ -130,8 +131,9 @@ def verify(ha):
raise ConfigError(f'VRRP group "{group}" uses IPv6 but hello-source-address is IPv4!')
if 'peer_address' in group_config:
- if is_ipv4(group_config['peer_address']):
- raise ConfigError(f'VRRP group "{group}" uses IPv6 but peer-address is IPv4!')
+ for peer_address in group_config['peer_address']:
+ if is_ipv4(peer_address):
+ raise ConfigError(f'VRRP group "{group}" uses IPv6 but peer-address is IPv4!')
# Check sync groups
if 'vrrp' in ha and 'sync_group' in ha['vrrp']:
for sync_group, sync_config in ha['vrrp']['sync_group'].items():