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

munin should not pull in Ruby, Python and Java unconditionally #227366

Open
Necoro opened this issue Apr 20, 2023 · 6 comments
Open

munin should not pull in Ruby, Python and Java unconditionally #227366

Necoro opened this issue Apr 20, 2023 · 6 comments

Comments

@Necoro
Copy link
Contributor

Necoro commented Apr 20, 2023

munin currently depends hard on Perl, Python, Ruby -- and Java. This adds quite a lot of bloat to a system, even though only Perl is a hard requirement.

Looking to other distros (example: Arch), only Perl is required.

Suggestion:

  • make python, ruby and java configurable [the latter should probably default to false]
  • provide a munin-minimal package that has all three disabled
@Necoro
Copy link
Contributor Author

Necoro commented Apr 21, 2023

@bjornfor Pinging you, as you are the munin maintainer.

I can probably create a PR for this.

@bjornfor
Copy link
Contributor

Suggestion:

  • make python, ruby and java configurable [the latter should probably default to false]
  • provide a munin-minimal package that has all three disabled

As long as the out-of-the-box experience is good (no broken plugins by default), and the module docstrings indicate how to get the full featured munin (if the default is stripped down) -- or the inverse.

I can probably create a PR for this.

👍

@Necoro
Copy link
Contributor Author

Necoro commented Apr 22, 2023

As long as the out-of-the-box experience is good (no broken plugins by default)

What do you mean by this? Munin expects plugins to be explicitly installed in /etc/munin/plugins.d. For each of the plugins, it is the admins responsibility to check their requirements and ensure they are installed (except for the runtime, often they require certain tools or perl packages to be around).

@bjornfor
Copy link
Contributor

As long as the out-of-the-box experience is good (no broken plugins by default)

What do you mean by this? Munin expects plugins to be explicitly installed in /etc/munin/plugins.d. For each of the plugins, it is the admins responsibility to check their requirements and ensure they are installed (except for the runtime, often they require certain tools or perl packages to be around).

Last time I used munin on NixOS, it'd auto-configure/auto-enable a bunch of plugins. If those auto-detected plugins require perl or java etc., and we remove those runtime deps by default, we might break setups that rely on defaults.

Maybe the ./nixos/tests/munin.nix catches that?

@Necoro
Copy link
Contributor Author

Necoro commented Apr 22, 2023

Ok. As far as I can see,

  • Java is required by exactly one plugin (for monitoring Tomcat instances).
  • Ruby is required by exactly one plugin (again: Tomcat... WTF?)
  • Python is required by multiple plugins
  • Perl is a hard requirement (munin is written in Perl). What needs some scrutinizing, are the required Perl libs. (The Gentoo ebuild contains a comment that the official listing is wrong.)

I'd argue: disabling Java and Ruby by default and mentioning this change in the NixOS changelog should be sufficient.
Perl and Python, I'd leave be. So the usecase of the "just enable it"-user should stil work out of the box. I'd even add some more Perl deps, that are currently missing (e.g. DBD-mysql)

I then can envision two more package variants:

  • munin-minimal which also disables Python and some larger Perl Libraries (DBD-mysql, DBD-pg, ...?). As this requires manual intervention, it is also safe to add a "Please ensure you manually add all deps that are required by the plugins you intend to use".
  • munin-with-java which re-enables java and ruby

@Necoro
Copy link
Contributor Author

Necoro commented Apr 22, 2023

Maybe the ./nixos/tests/munin.nix catches that?

This test is btw also broken: it yields an empty result.

(@domenkozar, @edolstra: You are listed as maintainers on the tests/munin.nix. Are you ok when I include the test in my "munin cleanup"-spree? Do you want to remain as maintainer of this test?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants