summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-09-21 22:33:07 +0200
committerChristian Poessinger <christian@poessinger.com>2021-09-21 22:33:07 +0200
commit260f383221ea1b23e644b0c50f45eeb300e9bc24 (patch)
tree0f6b4082dbc857d5bf9ec460d86bd3ecc5025572
parentb66ab0b02566d2b4eec6ec26db5122269fde89f1 (diff)
downloadvyos-1x-260f383221ea1b23e644b0c50f45eeb300e9bc24.tar.gz
vyos-1x-260f383221ea1b23e644b0c50f45eeb300e9bc24.zip
vrrp: keepalived: T616: drop /etc/default/keepalived
This is a follow-up commit to 65398e5c8 ("vrrp: keepalived: T616: move configuration to volatile /run directory") as it makes no sense to store a static /etc/default/keepalived file marked as "Autogenerated by VyOS" that only enabled the SNMP option to keepalived. Better pass the --snmp switch via the systemd override file and drop all other references/files.
-rw-r--r--data/templates/vrrp/daemon.tmpl5
-rw-r--r--python/vyos/ifconfig/vrrp.py1
-rwxr-xr-xsrc/conf_mode/vrrp.py1
-rw-r--r--src/etc/systemd/system/keepalived.service.d/override.conf2
4 files changed, 1 insertions, 8 deletions
diff --git a/data/templates/vrrp/daemon.tmpl b/data/templates/vrrp/daemon.tmpl
deleted file mode 100644
index c9dbea72d..000000000
--- a/data/templates/vrrp/daemon.tmpl
+++ /dev/null
@@ -1,5 +0,0 @@
-# Autogenerated by VyOS
-# Options to pass to keepalived
-
-# DAEMON_ARGS are appended to the keepalived command-line
-DAEMON_ARGS="--snmp"
diff --git a/python/vyos/ifconfig/vrrp.py b/python/vyos/ifconfig/vrrp.py
index 481b0284a..3d6f4d7c6 100644
--- a/python/vyos/ifconfig/vrrp.py
+++ b/python/vyos/ifconfig/vrrp.py
@@ -37,7 +37,6 @@ class VRRP(object):
'state': '/tmp/keepalived.data',
'stats': '/tmp/keepalived.stats',
'json': '/tmp/keepalived.json',
- 'daemon': '/etc/default/keepalived',
'config': '/run/keepalived/keepalived.conf',
'vyos': '/run/keepalived/keepalived_config.dict',
}
diff --git a/src/conf_mode/vrrp.py b/src/conf_mode/vrrp.py
index cee6a9ba2..55c4cc67a 100755
--- a/src/conf_mode/vrrp.py
+++ b/src/conf_mode/vrrp.py
@@ -231,7 +231,6 @@ def generate(data):
render(VRRP.location['config'], 'vrrp/keepalived.conf.tmpl',
{"groups": vrrp_groups, "sync_groups": sync_groups})
- render(VRRP.location['daemon'], 'vrrp/daemon.tmpl', {})
return None
diff --git a/src/etc/systemd/system/keepalived.service.d/override.conf b/src/etc/systemd/system/keepalived.service.d/override.conf
index e338b90a2..c18ae0c29 100644
--- a/src/etc/systemd/system/keepalived.service.d/override.conf
+++ b/src/etc/systemd/system/keepalived.service.d/override.conf
@@ -7,6 +7,6 @@ After=vyos-router.service
[Service]
KillMode=process
ExecStart=
-ExecStart=/usr/sbin/keepalived --use-file /run/keepalived/keepalived.conf --pid /run/keepalived/keepalived.pid --dont-fork $DAEMON_ARGS
+ExecStart=/usr/sbin/keepalived --use-file /run/keepalived/keepalived.conf --pid /run/keepalived/keepalived.pid --dont-fork --snmp
PIDFile=
PIDFile=/run/keepalived/keepalived.pid