FS#37595 - [systemd] Sysctl parameter (kernel.printk) don't apply at boot

Attached to Project: Arch Linux
Opened by miskoala (miskoala) - Saturday, 02 November 2013, 08:14 GMT
Last edited by Dave Reisner (falconindy) - Thursday, 05 December 2013, 20:25 GMT
Task Type Bug Report
Category System
Status Closed
Assigned To Dave Reisner (falconindy)
Tom Gundersen (tomegun)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

cat /etc/sysctl.d/10-printk.conf
kernel.printk = 3 3 3 3

However after reboot i see:
cat /proc/sys/kernel/printk
15 3 3 3

When I manually restart systemd-sysctl.service all works fine:
cat /proc/sys/kernel/printk
3 3 3 3

I added
[Service]
ExecStartPost=/bin/cat /proc/sys/kernel/printk

to /etc/systemd/system/systemd-sysctl.service.d/cat.conf

and reboot:

systemd-sysctl.service - Apply Kernel Variables
Loaded: loaded (/usr/lib/systemd/system/systemd-sysctl.service; static)
Drop-In: /etc/systemd/system/systemd-sysctl.service.d
└─cat.conf
Active: active (exited) since Sat 2013-11-02 00:14:00 CET; 7min ago
Docs: man:systemd-sysctl.service(8)
man:sysctl.d(5)
Process: 183 ExecStartPost=/bin/cat /proc/sys/kernel/printk (code=exited, status=0/SUCCESS)
Process: 163 ExecStart=/usr/lib/systemd/systemd-sysctl (code=exited, status=0/SUCCESS)
Main PID: 163 (code=exited, status=0/SUCCESS)

Nov 02 00:13:59 dell1210 systemd[1]: Starting Apply Kernel Variables...
Nov 02 00:14:00 dell1210 cat[183]: 3 3 3 3
Nov 02 00:14:00 dell1210 systemd[1]: Started Apply Kernel Variables.
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

I disabled all my services from /etc/systemd/system/multi-user.target.wants/ and reboot
but after login to console it's:
15 3 3 3

I don't use ant graphical login manager/didn't start X after login.

On systemd bugtracker they told me something else resets the variable later, so maybe it's Arch specific. I don't know how to trace it


uname -a
Linux dell1210 3.11.6-1-ARCH #1 SMP PREEMPT Sat Oct 19 00:29:46 CEST 2013 i686 GNU/Linux

pacman -Q systemd
systemd 208-2
This task depends upon

Closed by  Dave Reisner (falconindy)
Thursday, 05 December 2013, 20:25 GMT
Reason for closing:  Not a bug
Additional comments about closing:  User configuration issue. Please use the forums for support. systemd does not touch sysctl knobs that it isn't explicitly told to touch.
Comment by Jelle van der Waa (jelly) - Thursday, 05 December 2013, 19:07 GMT
@vesath, is this a sysctl or kernel bug or systemd?
Comment by Gaetan Bisson (vesath) - Thursday, 05 December 2013, 19:29 GMT
I blame it on systemd.

Sysctl is only a tool to apply kernel parameters; it changes nothing unless called by the user, systemd, etc.
And it seems highly unlikely that the kernel overrides configuration values set by the user.

Loading...