Page MenuHomeVyOS Platform

Error in SNMP config file generation on newly installed systems
Closed, ResolvedPublicBUG

Description

When setting up SNMP for the very first time this error will happen:

cpo@BR1# show service snmp
+community baz {
+    authorization ro
+    network 172.31.0.0/24
+}
+contact "FooBar <[email protected]>"
+listen-address 172.16.254.20 {
+}
+location "Foo City, Bar Ave 666"
[edit]

cpo@BR1# commit
[ service snmp ]
Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/snmp.py", line 843, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/snmp.py", line 796, in apply
    with open(config_file_user, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/snmp/snmpd.conf'

[[service snmp]] failed

Configuration file exists after this failed commit.

cpo@BR1# ls -al /var/lib/snmp/snmpd.conf
-rw------- 1 snmp snmp 1521 Jan  2 16:57 /var/lib/snmp/snmpd.conf

A second commit will fix this

cpo@BR1# show service snmp
+community baz {
+    authorization ro
+    network 172.31.0.0/24
+}
+contact "FooBar <[email protected]>"
+listen-address 172.16.254.20 {
+}
+location "Foo City, Bar Ave 666"
[edit]

cpo@BR1# commit

Details

Difficulty level
Easy (less than an hour)
Version
VyOS 1.2.0-EPA2
Why the issue appeared?
Design mistake

Event Timeline

c-po created this task.
syncer triaged this task as Normal priority.Jan 3 2019, 2:00 PM
syncer edited projects, added VyOS 1.2 Crux (VyOS 1.2.0-EPA3); removed VyOS 1.2 Crux.
c-po changed Why the issue appeared? from Will be filled on close to Design mistake.