From 60be130df1b5918c3bf1a460fdf65c5fa0e59253 Mon Sep 17 00:00:00 2001 From: Viacheslav Hletenko Date: Tue, 11 Jul 2023 12:48:37 +0000 Subject: T5341: HA migrate virtual-server tag to node address Migrate: high-availability virtual-server 203.0.113.1 to: high-availability virtual-server address 203.0.113.1 --- src/conf_mode/high-availability.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/conf_mode') diff --git a/src/conf_mode/high-availability.py b/src/conf_mode/high-availability.py index e18b426b1..2b1cdbd23 100755 --- a/src/conf_mode/high-availability.py +++ b/src/conf_mode/high-availability.py @@ -175,6 +175,11 @@ def verify(ha): # Virtual-server if 'virtual_server' in ha: for vs, vs_config in ha['virtual_server'].items(): + + if 'address' not in vs_config and 'fwmark' not in vs_config: + raise ConfigError('Either address or fwmark is required ' + f'but not set for virtual-server "{vs}"') + if 'port' not in vs_config and 'fwmark' not in vs_config: raise ConfigError(f'Port or fwmark is required but not set for virtual-server "{vs}"') if 'port' in vs_config and 'fwmark' in vs_config: -- cgit v1.2.3