From 1121bed93cf79b838babf73852a456820b865305 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Wed, 22 Sep 2021 08:31:53 +0200 Subject: vrrp: keepalived: T616: bugfix for invalid os.unlink() Commit 260f3832 ("vrrp: keepalived: T616: drop /etc/default/keepalived") dropped the old daemon configuration but there was one line of code that tried to delete the file which was no longer present. This resulted in: KeyError: 'daemon' --- src/conf_mode/vrrp.py | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src') diff --git a/src/conf_mode/vrrp.py b/src/conf_mode/vrrp.py index 55c4cc67a..71f3ddb84 100755 --- a/src/conf_mode/vrrp.py +++ b/src/conf_mode/vrrp.py @@ -245,19 +245,14 @@ def apply(data): print("Unable to rename the file with keepalived config for FIFO pipe: {}".format(err)) if not VRRP.is_running(): - print("Starting the VRRP process") ret = call("systemctl restart keepalived.service") else: - print("Reloading the VRRP process") ret = call("systemctl reload keepalived.service") if ret != 0: raise ConfigError("keepalived failed to start") else: - # VRRP is removed in the commit - print("Stopping the VRRP process") call("systemctl stop keepalived.service") - os.unlink(VRRP.location['daemon']) return None -- cgit v1.2.3