Now the sysctl settings are not reverted on ktune stop. This is to avoid cases
where the time window when the sysctl settings are reverted can cause unwanted
behaviour. E.g. it can temporary reset system limits on disk addition (because
ktune service is restarted by udev) which may cause some commands to fail.
It is still possible to switch to the old behaviour (reverting sysctl) by
exporting KTUNE_REVERT_SYSCTL and setting it to 1. This can be also
set per profile in the /etc/tune-profiles/PROFILE_NAME/ktune.sysconfig by
adding the following:
KTUNE_REVERT_SYSCTL=1
Resolves: rhbz#1111416
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit reversed it to read:
SYSCTL_POST="/etc/sysctl.conf /etc/sysctl.d/*"
The idea is to go from implicit to explicit, i.e. from defaults
to overrides in sysctl.d subdirectory. This behavior is
expected in RHEL-6.
But many distributions use the reverse approach (state before
this commit). The idea is that /etc/sysctl.d/* hosts default
settings provided by individual packages which can be overriden
by "master" /etc/sysctl.conf.
In Fedora (F20 checked) it is implemented by the following
symlink:
/etc/sysctl.d/99-sysctl.conf -> ../sysctl.conf
So it is also effectively reversed in comparison to RHEL-6.
As tuned-0.x is supported only in RHEL-6, we need to follow
RHEL-6 behaviour in tuned-1.0 branch. This change doesn't
affect tuned-2.x.
resolves: rhbz#1036049
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Also added support for the sysctl tunings taken from the
environment and conditional tunings (i.e. not to change
the sysctl settings if the current value is greater than
the new value).
To use the environment variable SEM:
kernel.sem = $SEM
To set the kernel.shmall only if the current value is less
than the 1000000:
kernel.shmall = >$1000000
Both can be combined, e.g.:
kernel.shmall = >$SHMALL
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
The default profile has no sysctl changes to it. If you try running
service ktune status after applying it, you get:
Current ktune sysctl settings:
awk: cmd. line:1: fatal: cannot open file `/var/run/ktune.save' for reading (No such file or directory)
After this patch:
Current ktune sysctl settings:
None
(Simply adds a check for $SAVE_FILE, and if not found, prints out NONE).
Signed-off-by: Jarod Wilson <jarod@redhat.com>