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

Don't touch sysctls set in sysctl.conf #518

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lkundrak
Copy link

TuneD reverting sysctls to values configured in sysctl.conf was reported to have made one fine gentleman very sad.

The individual commits contains more details & a proposed remedy.

Currently reapply_sysctl=1 will cause sysctl.conf(5) and sysctl.d(5) to
be loaded and all the sysctls configured set after sysctls that TuneD
decides to set.

There are some issues with this approach I'll address in a follow-up
commit. This one (hopefully) doesn't change the behavior.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Without TuneD, sysctls from sysctl.conf(5) are set once early on boot,
typically via systemd-sysctl.service(8) or a similar service.
TuneD, however, with reapply_sysctl=1 (which is default), applies these
settings later on during startup and on other occassions as well.

This is rather unfortunate, because it changes the semantics of
sysctl.conf(5). Without TuneD, the configured values serve as mere
defaults while with TuneD their values are maintained as configured.

This has been reported to break things [1] in case of an user who has
configured net.ipv6.conf.*.disable_ipv6=1 in sysctl.conf and the used a
different tool (NetworkManager) to override it later on, essentially
ending up with tools racing for setting the sysctl.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=2136749

Let's be a little less aggresive here and just avoid touching
the explicitly configured sysctls. Preserve the old behavior
for compatibility's sake, but turn it off by default.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
@lkundrak lkundrak marked this pull request as draft March 23, 2023 09:52
@lkundrak
Copy link
Author

lkundrak commented Mar 23, 2023

Marked as draft since it seems I need to fix tests first.

Also sorry about the s/tuned/teamd/ in branch name, it's due to brain rot from my dealings with teamd.

Edit: un-marking as draft, since the tests passed, meaning this is probably the best branch ever

@lkundrak lkundrak marked this pull request as ready for review March 23, 2023 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant