Public bug reported:

Looks like there are a couple of issues with snmpd on bionic running
under systemd, specifically, /etc/default/snmpd is completely ignored:

# ps -ef|grep snmpd
Debian-+ 26117     1  0 17:28 ?        00:00:00 /usr/sbin/snmpd -Lsd -Lf 
/dev/null -u Debian-snmp -g Debian-snmp -I -smux mteTrigger mteTriggerConf -f

but the configuration requested includes this:

# snmpd options (use syslog, close stdin/out/err).
SNMPDOPTS='-LS6d -Lf /dev/null -u root -g root -I -smux -p /var/run/snmpd.pid 
<internal IP> 127.0.0.1'

This may also affect U16 and later releases also using systemd, but I'm
only able to check U18 for now.

This bug may be related: https://bugs.debian.org/cgi-
bin/bugreport.cgi?bug=878828

It mentions /etc/systemd/system/snmpd.service as the master service
configuration file, but my system only has
/lib/systemd/system/snmpd.service

I've been able to determine a couple of unexpected behaviors:

1. if you have a PID file option in /etc/default/snmpd, systemd ignores
it; you can specify one in the unit file, but then, why bother having
/etc/default/snmpd? This should get called out in the documentation as
deprecated or the file should be removed from a future version of the
package

2. if you are binding snmpd to specific interfaces (passed as the final
command line argument), ordering in the systemd unit file can cause that
to behave in strange ways -- specifically, you need to add a "-p
/run/snmpd.pid" argument in the unit file, but that results in the
binding arguments being ignored, or the PID file being ignored,
depending on which argument shows up first

Basically -- if /etc/default/snmpd is no longer a reliable way to
configure snmpd, it shouldn't be included in the package anymore, or at
least, noted in the man page that configuration should be handled in a
different file. /etc/init.d/snmpd still exists as well, which is
similarly misleading, so it should probably be removed from the package
as well if it's redundant. These files seem to really only be a matter
of convention by now, but a lot of us are really used to the convention.
:-)

** Affects: net-snmp (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: bionic

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1829686

Title:
  systemd ignoring /etc/default/snmpd on U18

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1829686/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to