Bug 593211

Summary: RFE: Add /etc/sysctl.d/ support
Product: [Fedora] Fedora Reporter: Jens Kuehnel <bugzilla-redhat>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: iarlyy, jgorig, jonathan, martin, notting, plautrba, redhat.com, ruben, rvokal, vladimir.mv
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: initscripts-9.26-1.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-27 04:53:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 624385, 680527    
Attachments:
Description Flags
Implements sysctl.d on top of current F14 initscripts.
none
Patch for the spec in a fedpkg-style repo none

Description Jens Kuehnel 2010-05-18 07:56:51 UTC
Description of problem:

We have a *.d for almost everything, but not for sysctl.

We manage our servers with satellite, and some of our rpms would like to change things in /etc/sysctl.conf. It has to be done in the rpm, because some of our customers are not using RHN.

Of course the fix would be trivial.

Add to rc.sysint after:
sysctl -e -p /etc/sysctl.conf

for i in /etc/sysctl.d/*
do
  test -f $i && sysctl -e -p $i
done

The same thing exist in Debian/Ubuntu.

Comment 1 Daniel Novotny 2010-05-18 11:29:01 UTC
$ rpm -qf /etc/rc.sysinit 
initscripts-9.02.1-1.i686

=> reassigning from procps to initscripts

Comment 2 Martin Langhoff 2011-02-23 15:55:38 UTC
Created attachment 480509 [details]
Implements sysctl.d on top of current F14 initscripts.

Comment 3 Martin Langhoff 2011-02-23 16:38:52 UTC
Created attachment 480522 [details]
Patch for the spec in a fedpkg-style repo

Comment 5 Bill Nottingham 2011-02-25 19:49:11 UTC
Added in git, will go out in some future F-14 update.

Comment 6 Fedora Update System 2011-02-25 20:40:32 UTC
Package initscripts-9.20.2-1.fc14.1:
* should fix your issue,
* was pushed to the Fedora 14 updates-testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing initscripts-9.20.2-1.fc14.1'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/initscripts-9.20.2-1.fc14.1
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2011-02-26 04:00:24 UTC
initscripts-9.20.2-1.fc14.1 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update initscripts'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/initscripts-9.20.2-1.fc14.1

Comment 8 Vladimir Mosgalin 2011-02-26 12:42:47 UTC
This feature is great, but it doesn't allow values to be re-defined - for example, if one wants to use default distribution sysctl.conf and change settings, including ones that are in default sysctl.conf with user files in sysctl.conf.d, it won't work, because of other scripts.

While rc.sysinit correctly parses sysctl.conf and then sysctl.conf.d, so overriding values will work correctly, there is also /etc/rc.d/init.d/network script which executes "sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1" and does not re-parse sysctl.conf.d afterwards, which will result in overriding of user sysctl.conf.d settings with default after network service is (re)started.

Also documentation in sysconfig.txt probably should be updated to show existance of sysctl.conf.d (it has 3 references to sysctl.conf).

Comment 9 Fedora Update System 2011-02-27 04:52:37 UTC
initscripts-9.20.2-1.fc14.1 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Bill Nottingham 2011-02-28 21:40:55 UTC
(In reply to comment #8)
> This feature is great, but it doesn't allow values to be re-defined - for
> example, if one wants to use default distribution sysctl.conf and change
> settings, including ones that are in default sysctl.conf with user files in
> sysctl.conf.d, it won't work, because of other scripts.

True, but I'm having a hard time trying to figure out why a *package* would change the ones that are in /etc/sysctl.conf. It certainly can be edited by the admin.

That being said, it may be worth it to fix it to handle it.

Comment 11 Bill Nottingham 2011-02-28 21:58:28 UTC
Added in http://git.fedorahosted.org/git/?p=initscripts.git;a=commitdiff;h=3f296db591da779000a301b2b29560ee6df413f3

The docs references to sysctl.conf are correct, as that's where the default setting still lies.

Comment 12 Fedora Update System 2011-03-10 21:09:32 UTC
initscripts-9.26-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/initscripts-9.26-1.fc15

Comment 13 Fedora Update System 2011-03-14 05:38:41 UTC
initscripts-9.26-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.