[Bug 725412] New: systemd is not applying /lib/sysctl.d/sysctl.conf
https://bugzilla.novell.com/show_bug.cgi?id=725412 https://bugzilla.novell.com/show_bug.cgi?id=725412#c0 Summary: systemd is not applying /lib/sysctl.d/sysctl.conf Classification: openSUSE Product: openSUSE 12.1 Version: Factory Platform: Other OS/Version: Other Status: NEW Severity: Major Priority: P5 - None Component: Other AssignedTo: fcrozat@suse.com ReportedBy: idonmez@suse.com QAContact: qa@suse.de Found By: --- Blocker: --- I am adding the following to the end of /lib/sysctl.d/sysctl.conf: dev.cdrom.autoclose = 0 Upon reboot I check the value:
sysctl -a|grep dev.cdrom.autoclose = 1
After I manually run sysctl:
sudo /sbin/sysctl -e -q --system sysctl -a|grep dev.cdrom.autoclose = 0
So looks like systemd is not applying the sysctl.conf -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c1
Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c2
Ismail Donmez
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c3
Marius Tomaschewski
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c4
--- Comment #4 from Marius Tomaschewski
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c5
Ismail Donmez
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c6
--- Comment #6 from Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c7
Marius Tomaschewski
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c8
Ismail Donmez
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c9
Marius Tomaschewski
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c
Marius Tomaschewski
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c
Ismail Donmez
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c10
Malvern Star
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c
Andreas Jaeger
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c11
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c12
Andreas Jaeger
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c13
Ismail Donmez
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c14
--- Comment #14 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c15
--- Comment #15 from Ismail Donmez
4. Add cdrom module to the line of the variable INITRD_MODULES and run mkinitrd
This seems to be a way better fix. Is there any downside doing this? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c16
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c17
--- Comment #17 from Ismail Donmez
I'm not aware of ... nevertheless for a real fix point 3 is the better way that is insert modules before running sysctl ... simply by adding systemd-modules-load.service in the Before= line
Frederic? Would this be an option?
That won't help as is. The service is looking at the following directories: ConditionDirectoryNotEmpty=|/lib/modules-load.d ConditionDirectoryNotEmpty=|/usr/lib/modules-load.d ConditionDirectoryNotEmpty=|/usr/local/lib/modules-load.d ConditionDirectoryNotEmpty=|/etc/modules-load.d ConditionDirectoryNotEmpty=|/run/modules-load.d So we have to manually add "cdrom" to one of these files. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c18
Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c19
Ismail Donmez
no opposition for the added dependency, ping me if you want me to add it (I guess it should also go upstream).
Well this alone doesn't solve the problem, we need systemd-modules-load.service to load "cdrom" module as well. Can we do this in default systemd setup? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c20
--- Comment #20 from Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c21
Ismail Donmez
It isn't systemd job to "load" modules (be it cdrom or any other modules).
Something else should create (or package) a cdrom.conf file in /lib/modules-load.d
We should just make cdrom loaded in initrd. Werner, what do you think? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c
Ismail Donmez
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c22
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c23
Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c24
--- Comment #24 from Ismail Donmez
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c25
--- Comment #25 from Malvern Star
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c26
Ismail Donmez
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c27
--- Comment #27 from Marius Tomaschewski
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c28
--- Comment #28 from Ismail Donmez
I'm not Werner, but there are IMO two ways to load them as workaround: either append them to /etc/sysconfig/kernel:INITRD_MODULES="" and call mkinitrd or to /etc/sysconfig/kernel:MODULES_LOADED_ON_BOOT="", so the /etc/init.d/boot.loadmodules will script will load them "quite early".
Thanks a lot, INITRD_MODULES seems to the best way to load the module. Werner, do you have any objections/suggestions? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c29
--- Comment #29 from Malvern Star
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c30
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c31
Ismail Donmez
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c32
Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c33
Ismail Donmez
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c34
Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c35
Ismail Donmez
could you try copying /lib/systemd/system/systemd-sysctl.service to /etc/systemd/system
and add After=systemd-modules-load.service
in the [Unit] section.
Currently, there is no ordering defined between those two services (which are "early services" so this omission doesn't affect most of other services)
Yes, it works like this! I guess you'll apply this change to systemd package too? Then I can add cdrom to MODULES_LOADED_ON_BOOT and then we can close this bug :-) Happy new year btw! ;) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c36
Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c37
Ismail Donmez
Could you test package from home:fcrozat:systemd / systemd (and remove /etc/systemd/system/systemd-sysctl.service) to confirm the fix in the package is working properly ?
Works! Thanks. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c38
--- Comment #38 from Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c39
--- Comment #39 from Malvern Star
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c40
--- Comment #40 from Frederic Crozat
Thanks Federic. Looking forward to that update. Are we talking weeks? Months?
weeks.. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c41
--- Comment #41 from Malvern Star
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c42
--- Comment #42 from Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c43
Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c44
--- Comment #44 from Michal Marek
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c45
--- Comment #45 from Ismail Donmez
Why don't you simply add 'options cdrom autoclose=1' to a file in /etc/modprobe.d, instead the sysctl setting?
Anything problematic with the sysctl method? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c46
--- Comment #46 from Malvern Star
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c47
--- Comment #47 from Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c48
Cristian Rodríguez
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c49
--- Comment #49 from Malvern Star
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c50
--- Comment #50 from Cristian Rodríguez
Bug does not appear present in 13.1 M2. Can anybody else confirm?
No, it is not present but the underlying problem persists, it was swapped under the rug. The permanent correct solution is to do this --> Michal Marek 2012-03-22 06:28:49 CLT Why don't you simply add 'options cdrom autoclose=1' to a file in /etc/modprobe.d, instead the sysctl setting? Such file should belong to the suse-module-tools package and the patch to systemd should be reverted entirely. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c51
Malvern Star
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c
Ye Yuan
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c
Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c52
--- Comment #52 from Ludwig Nussel
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c53
--- Comment #53 from Frederic Crozat
What is expected from me here? sysctl is broken by design unfortunately.
I'd say removing the cdrom part from sysctl.conf file and create a drop-in file in /etc/modprobe.d (and still keep this file in aaa_base) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c54
--- Comment #54 from Ludwig Nussel
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c55
--- Comment #55 from Ismail Donmez
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c56
--- Comment #56 from Ludwig Nussel
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c57
--- Comment #57 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c58
--- Comment #58 from Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c59
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c60
--- Comment #60 from Frederic Crozat
Nevertheless specific cdrom sysctl settings belongs not to procpes but to an own configuration file below /etc/sysctl.conf or /usr/lib/sysctl.d/*.conf
I agree, those configuration / policies should be splitted to a separate package. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c61
Malvern Star
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c
Xiyuan Liu
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c63
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c64
--- Comment #64 from Malvern Star
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c65
--- Comment #65 from Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c66
Dr. Werner Fink
https://bugzilla.novell.com/show_bug.cgi?id=725412
https://bugzilla.novell.com/show_bug.cgi?id=725412#c67
Michal Marek
participants (1)
-
bugzilla_noreply@novell.com