1
0
Fork 0

Merge pull request #226 from olysonek/reapply-sysctl-fix

sysctl: Make reapply_sysctl ignore configs from /usr
This commit is contained in:
Jaroslav Škarvada 2019-11-28 00:14:50 +01:00 committed by GitHub
commit 4139efa957
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 15 deletions

View file

@ -61,14 +61,14 @@ applicable if \fBdaemon\fR is enabled. By default it's set to \fBTrue\fR.
.TP
.BI reapply_sysctl= BOOL
This controls whether to reapply sysctl settings from the \fI/etc/sysctl.conf\fR,
\fI/etc/sysctl.d/*.conf\fR, \fI/usr/lib/sysctl.d/*.conf\fR,
\fI/usr/local/lib/sysctl.d/*.conf\fR, \fI/lib/sysctl.d/*.conf\fR,
\fI/run/sysctl.d/*.conf\fR, i.e. all locations supported by
\fBsysctl --system\fR after Tuned sysctl settings are applied, i.e. if
set to \fBTrue\fR or \fB1\fR Tuned sysctl settings will not override system
sysctl settings. If set to \fBFalse\fR or \fB0\fR Tuned sysctl settings will
override system sysctl settings. By default it's set to \fBTrue\fR.
This controls whether to reapply sysctl settings from \fI/run/sysctl.d/*.conf\fR,
\fI/etc/sysctl.d/*.conf\fR and \fI/etc/sysctl.conf\fR after Tuned sysctl
settings are applied. These are locations supported by \fBsysctl --system\fR,
excluding those that contain sysctl configuration files provided by system packages.
So if \fBreapply_sysctl\fR is set to \fBTrue\fR or \fB1\fR, Tuned sysctl settings
will not override user-provided system sysctl settings. If set to \fBFalse\fR or
\fB0\fR, Tuned sysctl settings will override system sysctl settings. By default
it's set to \fBTrue\fR.
.TP
.BI default_instance_priority= INT

View file

@ -22,9 +22,10 @@ update_interval = 10
# one hardcoded profile (by default "balanced").
recommend_command = 1
# Whether to reapply sysctl from the e.g /etc/sysctl.conf, /etc/sysctl.d, ...
# If enabled these sysctls will be re-appliead after Tuned sysctls are
# applied, i.e. Tuned sysctls will not override system sysctls.
# Whether to reapply sysctl from /run/sysctl.d/, /etc/sysctl.d/ and
# /etc/sysctl.conf. If enabled, these sysctls will be re-appliead
# after Tuned sysctls are applied, i.e. Tuned sysctls will not
# override user-provided system sysctls.
reapply_sysctl = 1
# Default priority assigned to instances

View file

@ -12,10 +12,7 @@ log = tuned.logs.get()
DEPRECATED_SYSCTL_OPTIONS = [ "base_reachable_time", "retrans_time" ]
SYSCTL_CONFIG_DIRS = [ "/run/sysctl.d",
"/etc/sysctl.d",
"/usr/local/lib/sysctl.d",
"/usr/lib/sysctl.d",
"/lib/sysctl.d" ]
"/etc/sysctl.d" ]
class SysctlPlugin(base.Plugin):
"""