Bug 767795

Summary: systemd-sysctl is inherently racy
Product: [Fedora] Fedora Reporter: Bill Nottingham <notting>
Component: systemdAssignee: Michal Sekletar <msekleta>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: edgar.hoch, johannbg, k.georgiou, lpoetter, metherid, mschmidt, msekleta, notting, orion, plautrba, rvokal, systemd-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-07 22:49:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 760254    

Description Bill Nottingham 2011-12-14 21:48:12 UTC
Description of problem:

If a package provides a sysctl file in /usr/lib/sysctl.d, and the admin wants to override some setting in that file, it is racy to do so unless they create a file with the exact same name in /etc/sysctl.d. This should be noted more clearly in the documentation - it is not enough to have a setting that evaluates later, they must override the file itself (and, therefore, all other settings in that file).

To be precise - attempting to override a /usr/lib/sysctl.d setting in /etc/sysctl.conf will always leave a (small) window where the setting is the packaged setting, instead of the overridden setting in /etc/sysctl.conf.

Version-Release number of selected component (if applicable):

systemd-37-3

How reproducible:

100%

Steps to Reproduce:
1. looked at the code

Additional info:

A potential fix would be for systemd-sysctl to read all files, and weed out the duplicate keys so that only the last one applies. This obviously complicates the code.

Comment 1 Michal Sekletar 2012-08-01 14:21:52 UTC
I've prepared the patch, once it is reviewed it should appear in upstream git. Thanks for report.

Comment 2 Michal Schmidt 2012-08-06 16:26:39 UTC
Applied Michal's patch with a few changes:

http://cgit.freedesktop.org/systemd/systemd/commit/?id=86fc77c47f2d22cd01d0871866869cb194af0884

Comment 3 Fedora Update System 2012-09-20 19:56:40 UTC
systemd-190-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/systemd-190-1.fc18

Comment 4 Fedora Update System 2012-09-22 06:37:48 UTC
Package systemd-191-2.fc18, rtkit-0.11-3.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-191-2.fc18 rtkit-0.11-3.fc18'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-14581/rtkit-0.11-3.fc18,systemd-191-2.fc18
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2012-09-28 00:18:19 UTC
Package glibc-2.16-17.fc18, systemd-192-1.fc18, selinux-policy-3.11.1-23.fc18, rtkit-0.11-3.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing glibc-2.16-17.fc18 systemd-192-1.fc18 selinux-policy-3.11.1-23.fc18 rtkit-0.11-3.fc18'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-14581/selinux-policy-3.11.1-23.fc18,rtkit-0.11-3.fc18,systemd-192-1.fc18,glibc-2.16-17.fc18
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2012-10-01 20:11:02 UTC
Package glibc-2.16-17.fc18, rtkit-0.11-3.fc18, systemd-193-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing glibc-2.16-17.fc18 rtkit-0.11-3.fc18 systemd-193-1.fc18'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-14581/rtkit-0.11-3.fc18,systemd-193-1.fc18,glibc-2.16-17.fc18
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2012-10-12 16:46:11 UTC
systemd-44-20.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/systemd-44-20.fc17