Your message dated Sat, 18 Jan 2025 18:07:05 +1100
with message-id
<CALy8Cw7CGpNizYZrh=ek5pcggms_gz8bi8vrxrh0nukhxmm...@mail.gmail.com>
and subject line Re: Bug#1093279: snmptrapd ignores any shipped configuration
when started from systemd
has caused the Debian Bug report #1093279,
regarding snmptrapd ignores any shipped configuration when started from systemd
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1093279: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1093279
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: snmptrapd
Version: 5.9.3+dfsg-2
Severity: important
Dear Maintainer,
The shipped /lib/systemd/system/snmptrapd.service unit file ignores both the
included /etc/default/snmptrapd (only used from the initscript) and
/etc/snmp/snmptrapd.conf.
On top of that, since the ExecStart= line is wrong
(ExecStart=/usr/sbin/snmptrapd -LOw -f udp:162 udp6:162), it is rather tricky to
overcome with an override file (you have to "reset" ExecStart first).
Example local "user" fix in
/etc/systemd/system/snmptrapd.service.d/execstart.conf:
---
[Service]
ExecStart=
ExecStart=/usr/sbin/snmptrapd -Cc /etc/snmp/snmptrapd.conf
---
But of course, this should rather be fixed in the packaging itself, hence this
ticket.
Best regards.
-- System Information:
Debian Release: 12.9
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.1.0-28-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages snmptrapd depends on:
ii init-system-helpers 1.65.2
ii libc6 2.36-9+deb12u9
ii libnetsnmptrapd40 5.9.3+dfsg-2
ii libsnmp40 5.9.3+dfsg-2
ii libwrap0 7.6.q-32
ii snmpd 5.9.3+dfsg-2
Versions of packages snmptrapd recommends:
ii perl 5.36.0-7+deb12u1
snmptrapd suggests no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
On Fri, 17 Jan 2025 at 21:51, Jerome Warnier <[email protected]> wrote:
>
> The shipped /lib/systemd/system/snmptrapd.service unit file ignores both
> the
> included /etc/default/snmptrapd (only used from the initscript) and
> /etc/snmp/snmptrapd.conf.
>
The first is by design, the second is not true.
/etc/default/* is used for old init scripts, not for systemd units.
It actually says that in the file
# This file controls the behaviour of /etc/init.d/snmptrapd
# but not of the corresponding systemd service file.
Onto snmptrapd.conf, let's first put "outputOption n" into the
configuration file, send a trap and check the journal:
Jan 18 17:58:16 elmo snmptrapd[853516]: .1.3.6.1.6.3.1.1.4.1.0 = OID:
.1.3.6.1.6.3.1.1.5.3 .1.3.6.1.2.1.2.2.1.1 = INTEGER: 2
.1.3.6.1.2.1.2.2.1.7 = INTEGER: up(1) .1.3.6.1.2.1.2.2.1.8 =
INTEGER: up(1)
Now lets comment out that line, restart the daemon, send a trap and check
the journal:
Jan 18 18:00:03 elmo snmptrapd[854207]: SNMPv2-MIB::snmpTrapOID.0 = OID:
IF-MIB::linkDown IF-MIB::ifIndex = INTEGER: 2
IF-MIB::ifAdminStatus = INTEGER: up(1) IF-MIB::ifOperStatus =
INTEGER: up(1)
That looks like the configuration file is working.
On top of that, since the ExecStart= line is wrong
>
It's not, I have no idea what you're trying to do in the configuration file
but it's parsing it fine here.
- Craig
--- End Message ---