Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for systemd on Ubuntu and improve it on Debian #281

Merged
merged 2 commits into from
Jan 10, 2024

Conversation

hbog
Copy link
Contributor

@hbog hbog commented Jan 8, 2024

Pull Request (PR) description

The transition to systemd in Ubuntu and Debian is not completely reflected in this module. Systemd support for snmpd for Debian was added, but not for Ubuntu. Support for snmpdtrapd lacks on Debian and Ubuntu.

Because systemd ignores the sysconfig files in /etc/default/, parameters set in this module (for example snmp_options) have no effect on the managed system.

This PR adds the necessary systemd override files with the default options equal to those in their respective distribution.
The sysconfig files are still present to assure backwards compatibility with other tools or init systems.

This commit may have an impact in environments with custom parameters (for for example snmpd_options or snmptrapd_options). Because these were ignored in the past, the snmp daemon way fail to restart when the parameter values are incompatible with systemd. For example, the .service files in Debian and Ubuntu assume that the snmp(trap)d process remains in foreground (-f` option).

Some parts of the test code that were no longer reached as a result of phasing out support for older os versions, have been removed.

This PR also includes support for Debian 12.(#279)

This Pull Request (PR) fixes the following issues

Fixes #280

The default snmpd_options for Debian 12 are the same as those in the
snmpd package and reflect that rsyslog is deprecated in bookworm and
that the messages should go to the systemd journal.
Snmp daemon options in the snmp(trap)d.sysconfig file are ignored in
current versions of Ubuntu (as of 18.04) and Debian (as of 9) and should
be set in a systemd unit override file instead. The
snmp(trap)d.sysconfig files are still present for compatibility with
other tools.
@kenyon kenyon added the enhancement New feature or request label Jan 10, 2024
@kenyon kenyon merged commit 3f5ea62 into voxpupuli:master Jan 10, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

snmpd_options and/or snmptrapd_options are ignored on Ubuntu and Debian due to lack of systemd support
2 participants