summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2023-09-26 14:54:00 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2023-09-26 15:31:41 +0000
commit5a6938a2e14373dfaa72211fe18deeb257d3ba12 (patch)
tree57cb136b98e36b55725c350d1ac68fe81e61b6f0 /data
parentda4006c2a784ff06cf3af3aad6adee7fef8a5330 (diff)
downloadvyos-1x-5a6938a2e14373dfaa72211fe18deeb257d3ba12.tar.gz
vyos-1x-5a6938a2e14373dfaa72211fe18deeb257d3ba12.zip
T5586: Disable by default SNMP for Keeplived VRRP service
AgentX does not work stable. From time to time we see the system service crashing/degrading if something is wrong with SNMP from util net-snmp. We should disable it by default and enable it only if configured. set high-availability vrrp snmp
Diffstat (limited to 'data')
-rw-r--r--data/templates/vrrp/10-override.conf.j216
1 files changed, 16 insertions, 0 deletions
diff --git a/data/templates/vrrp/10-override.conf.j2 b/data/templates/vrrp/10-override.conf.j2
new file mode 100644
index 000000000..4a16012b6
--- /dev/null
+++ b/data/templates/vrrp/10-override.conf.j2
@@ -0,0 +1,16 @@
+### Autogenerated by ${vyos_conf_scripts_dir}/vrrp.py ###
+{% set snmp = '--snmp' if snmp is defined else '' %}
+[Unit]
+After=vyos-router.service
+# Only start if there is our configuration file - remove Debian default
+# config file from the condition list
+ConditionFileNotEmpty=
+ConditionFileNotEmpty=/run/keepalived/keepalived.conf
+
+[Service]
+KillMode=process
+Type=simple
+# Read configuration variable file if it is present
+ExecStart=
+ExecStart=/usr/sbin/keepalived --use-file /run/keepalived/keepalived.conf --pid /run/keepalived/keepalived.pid --dont-fork {{ snmp }}
+PIDFile=/run/keepalived/keepalived.pid