summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2023-09-15 07:24:48 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2023-09-15 07:24:48 +0000
commit47875457cd8b176f7f23a3141175d745aeb14d8a (patch)
tree56fd4c2c560456a2878915cd70b9fcaf28d65db6
parent8f705fb8cb0cd707ae3c144834eaa2b4c1b7f810 (diff)
downloadvyos-1x-47875457cd8b176f7f23a3141175d745aeb14d8a.tar.gz
vyos-1x-47875457cd8b176f7f23a3141175d745aeb14d8a.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
-rw-r--r--data/templates/high-availability/10-override.conf.j22
-rw-r--r--interface-definitions/high-availability.xml.in4
-rwxr-xr-xsrc/conf_mode/high-availability.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/data/templates/high-availability/10-override.conf.j2 b/data/templates/high-availability/10-override.conf.j2
index d1cb25581..c153f09b4 100644
--- a/data/templates/high-availability/10-override.conf.j2
+++ b/data/templates/high-availability/10-override.conf.j2
@@ -1,5 +1,5 @@
### Autogenerated by ${vyos_conf_scripts_dir}/high-availability.py ###
-{% set snmp = '' if vrrp.disable_snmp is vyos_defined else '--snmp' %}
+{% set snmp = '--snmp' if vrrp.snmp is vyos_defined else '' %}
[Unit]
After=vyos-router.service
# Only start if there is our configuration file - remove Debian default
diff --git a/interface-definitions/high-availability.xml.in b/interface-definitions/high-availability.xml.in
index 47a772d04..aa23888a4 100644
--- a/interface-definitions/high-availability.xml.in
+++ b/interface-definitions/high-availability.xml.in
@@ -12,10 +12,10 @@
<help>Virtual Router Redundancy Protocol settings</help>
</properties>
<children>
- <leafNode name="disable-snmp">
+ <leafNode name="snmp">
<properties>
<valueless/>
- <help>Disable SNMP</help>
+ <help>Enable SNMP</help>
</properties>
</leafNode>
<node name="global-parameters">
diff --git a/src/conf_mode/high-availability.py b/src/conf_mode/high-availability.py
index 70f43ab52..b3b27b14e 100755
--- a/src/conf_mode/high-availability.py
+++ b/src/conf_mode/high-availability.py
@@ -59,7 +59,7 @@ def get_config(config=None):
if conf.exists(conntrack_path):
ha['conntrack_sync_group'] = conf.return_value(conntrack_path)
- if leaf_node_changed(conf, base + ['vrrp', 'disable-snmp']):
+ if leaf_node_changed(conf, base + ['vrrp', 'snmp']):
ha.update({'restart_required': {}})
return ha