summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-05-10 21:13:08 +0200
committerGitHub <noreply@github.com>2023-05-10 21:13:08 +0200
commit6eaa327c2a3bca3924e72cf7c5736489bb76f784 (patch)
tree3dcd4adf7692682026b3290b36c96de91d46c580 /src
parent96d9bf0a88fc822b8edd78db293b7f17ae8766cf (diff)
parent8dc6b0aa8d7bbecfc5087a7406725812779eaaf6 (diff)
downloadvyos-1x-6eaa327c2a3bca3924e72cf7c5736489bb76f784.tar.gz
vyos-1x-6eaa327c2a3bca3924e72cf7c5736489bb76f784.zip
Merge pull request #1987 from dmbaturin/T5251-vrrp-group-ping
T5215: add a built-in ping check for VRRP groups
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/high-availability.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/conf_mode/high-availability.py b/src/conf_mode/high-availability.py
index 5e76dd9f9..7a63f5b4b 100755
--- a/src/conf_mode/high-availability.py
+++ b/src/conf_mode/high-availability.py
@@ -106,6 +106,13 @@ def verify(ha):
if not {'password', 'type'} <= set(group_config['authentication']):
raise ConfigError(f'Authentication requires both type and passwortd to be set in VRRP group "{group}"')
+ if 'health_check' in group_config:
+ from vyos.utils.dict import check_mutually_exclusive_options
+ try:
+ check_mutually_exclusive_options(group_config["health_check"], ["script", "ping"], required=True)
+ except ValueError as e:
+ raise ConfigError(f'Health check config is incorrect in VRRP group "{group}": {e}')
+
# Keepalived doesn't allow mixing IPv4 and IPv6 in one group, so we mirror that restriction
# We also need to make sure VRID is not used twice on the same interface with the
# same address family.