Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
On Red Hat Enterprise Linux 6, the /etc/sysctl.conf file is the default configuration file for the sysctl tool settings and overrides can be specified in the /etc/sysctl.d/ directory. The tuned service previously handled the settings the opposite way, which is common in certain distributions. Consequently, the configuration specified in /etc/sysctl.d/ could be overridden by /etc/sysctl.conf. The way tuned handles /etc/sysctl.conf and /etc/sysctl.d/ has been reversed to match the Red Hat Enterprise Linux 6 logic. As a result, /etc/sysctl.conf is now processed first and can be overridden by settings in /etc/sysctl.d/.
Description of problem:
SYSCTL_POST="/etc/sysctl.d/* /etc/sysctl.conf" should be reversed. I belived it should be reverse because it should go from implicit to explicit, that is from "defaults" to "overriden" valued in sysctl.d subdir.
Found this hard when /etc/sysctl.d/ovirt-engine.conf sysctl values where again overriden.
Some apps could put their sysctl settings into sysctl.d subdir, thus those values should always win.
Version-Release number of selected component (if applicable):
tuned-0.2.19-13.el6.noarch
How reproducible:
100%
Steps to Reproduce:
1. modify as below:
# grep kernel.shmmax /etc/sysctl.conf /etc/sysctl.d/*
/etc/sysctl.conf:##kernel.shmmax = 68719476736
/etc/sysctl.conf:kernel.shmmax = 30000000
/etc/sysctl.d/ovirt-engine.conf:kernel.shmmax = 41943040
2. install tuned
3. reboot
Actual results:
values defined in files in sysctl.d dir are again overriden by ktuned RC script because of order (SYSCTL_POST="/etc/sysctl.d/* /etc/sysctl.conf") defined in /etc/sysconfig/ktune
Expected results:
values defined in files in sysctl.d dir should always win! (switch order in /etc/sysconfig/ktune)
Additional info:
functions file has valid ordering of sysctl conf files processing, thus why ktune reverses the order?
# sed -n '/^apply/,/^$/p' /etc/init.d/functions
apply_sysctl() {
sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1
for file in /etc/sysctl.d/* ; do
is_ignored_file "$file" && continue
test -f "$file" && sysctl -e -p "$file" >/dev/null 2>&1
done
}
Just for archives, RHEVM sysctl stuff - BZ1027605.
Comment 3RHEL Program Management
2013-12-02 15:54:16 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 4Jaroslav Škarvada
2013-12-03 16:58:42 UTC
Hmm, by checking /etc/init.d/functions:apply_sysctl it does seem that RHEL-6 uses reverse order than other distros (including current Fedora) do. We need to be consistent with the init script, thus giving dev_ack+
Comment 5Jaroslav Škarvada
2013-12-03 17:02:52 UTC
Side note: /etc/sysctl.conf is deprecated in current Fedora (F20) and supported by symlink: /etc/sysctl.d/99-sysctl.conf -> ../sysctl.conf
Comment 12Jaroslav Škarvada
2015-02-09 13:59:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2015-1376.html
Description of problem: SYSCTL_POST="/etc/sysctl.d/* /etc/sysctl.conf" should be reversed. I belived it should be reverse because it should go from implicit to explicit, that is from "defaults" to "overriden" valued in sysctl.d subdir. Found this hard when /etc/sysctl.d/ovirt-engine.conf sysctl values where again overriden. Some apps could put their sysctl settings into sysctl.d subdir, thus those values should always win. Version-Release number of selected component (if applicable): tuned-0.2.19-13.el6.noarch How reproducible: 100% Steps to Reproduce: 1. modify as below: # grep kernel.shmmax /etc/sysctl.conf /etc/sysctl.d/* /etc/sysctl.conf:##kernel.shmmax = 68719476736 /etc/sysctl.conf:kernel.shmmax = 30000000 /etc/sysctl.d/ovirt-engine.conf:kernel.shmmax = 41943040 2. install tuned 3. reboot Actual results: values defined in files in sysctl.d dir are again overriden by ktuned RC script because of order (SYSCTL_POST="/etc/sysctl.d/* /etc/sysctl.conf") defined in /etc/sysconfig/ktune Expected results: values defined in files in sysctl.d dir should always win! (switch order in /etc/sysconfig/ktune) Additional info: functions file has valid ordering of sysctl conf files processing, thus why ktune reverses the order? # sed -n '/^apply/,/^$/p' /etc/init.d/functions apply_sysctl() { sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1 for file in /etc/sysctl.d/* ; do is_ignored_file "$file" && continue test -f "$file" && sysctl -e -p "$file" >/dev/null 2>&1 done }