From 5f2926cf04e8a569bb25cd4121179d12b9e04c6c Mon Sep 17 00:00:00 2001 From: Viacheslav Hletenko Date: Tue, 5 Sep 2023 20:36:04 +0000 Subject: T5533: Fix for vrrp dict key if virtual-server is used When using `virtual-server` alongside Keepalived, there can be situations where the `vrrp` key is completely unused. --- src/conf_mode/high-availability.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/conf_mode/high-availability.py b/src/conf_mode/high-availability.py index e24670417..70f43ab52 100755 --- a/src/conf_mode/high-availability.py +++ b/src/conf_mode/high-availability.py @@ -188,7 +188,7 @@ def apply(ha): return None # Check if IPv6 address is tentative T5533 - for group, group_config in ha['vrrp']['group'].items(): + for group, group_config in ha.get('vrrp', {}).get('group', {}).items(): if 'hello_source_address' in group_config: if is_ipv6(group_config['hello_source_address']): ipv6_address = group_config['hello_source_address'] -- cgit v1.2.3