summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-09-22 08:31:53 +0200
committerChristian Poessinger <christian@poessinger.com>2021-09-22 08:31:53 +0200
commit1121bed93cf79b838babf73852a456820b865305 (patch)
treee9d57049ebd53174838dfee6e3c550c2bf6af1ba /src
parent260f383221ea1b23e644b0c50f45eeb300e9bc24 (diff)
downloadvyos-1x-1121bed93cf79b838babf73852a456820b865305.tar.gz
vyos-1x-1121bed93cf79b838babf73852a456820b865305.zip
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'
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/vrrp.py5
1 files changed, 0 insertions, 5 deletions
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