From b658f601f03f67ed311cfa0c6fcdb15d2dc21ca7 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. (cherry picked from commit 5f2926cf04e8a569bb25cd4121179d12b9e04c6c) --- src/conf_mode/high-availability.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/conf_mode') diff --git a/src/conf_mode/high-availability.py b/src/conf_mode/high-availability.py index 0121df11c..2bfae4f3e 100755 --- a/src/conf_mode/high-availability.py +++ b/src/conf_mode/high-availability.py @@ -176,7 +176,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