Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 642192 - sys-apps/systemd-236-r1: systemd-sysctl.service fails to start
Summary: sys-apps/systemd-236-r1: systemd-sysctl.service fails to start
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-25 10:38 UTC by Pacho Ramos
Modified: 2017-12-31 11:27 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2017-12-25 10:38:34 UTC
I get this error:
# systemctl status systemd-sysctl.service
● systemd-sysctl.service - Apply Kernel Variables
   Loaded: loaded (/lib/systemd/system/systemd-sysctl.service; static; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2017-12-25 01:32:00 CET; 10h ago
     Docs: man:systemd-sysctl.service(8)
           man:sysctl.d(5)
  Process: 299 ExecStart=/lib/systemd/systemd-sysctl (code=exited, status=1/FAILURE)
 Main PID: 299 (code=exited, status=1/FAILURE)

dic 25 01:32:00 dell-2017 systemd[1]: Starting Apply Kernel Variables...
dic 25 01:32:00 dell-2017 systemd-sysctl[299]: Couldn't write 'fq_codel' to 'net/core/default_qdisc': Input/output error
dic 25 01:32:00 dell-2017 systemd-sysctl[299]: Couldn't write '1' to 'kernel/sysrq', ignoring: No such file or directory
dic 25 01:32:00 dell-2017 systemd[1]: systemd-sysctl.service: Main process exited, code=exited, status=1/FAILURE
dic 25 01:32:00 dell-2017 systemd[1]: systemd-sysctl.service: Failed with result 'exit-code'.
dic 25 01:32:00 dell-2017 systemd[1]: Failed to start Apply Kernel Variables.

The usage of fq_codel needs to have NET_SCH_FQ_CODEL enabled... I am not sure if it's a really hard requirement but, in any case, that switch is being forced by 
# Fair Queue CoDel packet scheduler to fight bufferbloat
net.core.default_qdisc = fq_codel

in /usr/lib/sysctl.d/50-default.conf

I guess that upstream wants us to enable it as, otherwise, they should have made it behave similar to sysrq switch... that is ignored when not found
Comment 1 Mike Gilbert gentoo-dev 2017-12-25 14:49:59 UTC
I don't think this setting is critical, and the error can be ignored (by us).

> I guess that upstream wants us to enable it as, otherwise, they should have made it behave similar to sysrq switch... that is ignored when not found

Not sure what you mean by that. How is sysrq handled differently?
Comment 2 Mike Gilbert gentoo-dev 2017-12-25 14:51:45 UTC
On the other hand, it would be easy to add a kernel check and enable it in gentoo-sources by default. Sound reasonable?
Comment 3 Pacho Ramos gentoo-dev 2017-12-26 12:13:25 UTC
It is different because sysrq error doesn't end up with the service exiting with "1" status (the error is "ignored"), while fq_codel does

Yeah, for me adding the check would be enough, but I am unsure if maybe some people will complain if it's not really needed :/
Comment 4 Pacho Ramos gentoo-dev 2017-12-26 12:40:38 UTC
To summarize: as soon as the service keeps exiting as a failure when the file is missing, I would request the kernel option to be enabled... but if that is optional, probably upstream should make it not die so hardly in future versions and, then, we could drop the requirement
Comment 5 Mike Gilbert gentoo-dev 2017-12-26 14:46:04 UTC
Oh, I see; systemd-sysctl behave differently in response to certain errors:

https://github.com/systemd/systemd/blob/v236/src/sysctl/sysctl.c#L55
Comment 6 Mike Gilbert gentoo-dev 2017-12-26 14:46:55 UTC
Created an issue upstream.
Comment 7 Larry the Git Cow gentoo-dev 2017-12-31 02:30:44 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79d5e6bd1566e3851b6c4be2b9a263897cf29422

commit 79d5e6bd1566e3851b6c4be2b9a263897cf29422
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2017-12-31 02:23:33 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2017-12-31 02:30:37 +0000

    sys-apps/systemd: backport sysctl fix
    
    Closes: https://bugs.gentoo.org/642192
    Package-Manager: Portage-2.3.19_p3, Repoman-2.3.6_p37

 sys-apps/systemd/Manifest                                         | 2 +-
 sys-apps/systemd/{systemd-236-r3.ebuild => systemd-236-r4.ebuild} | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 8 Pacho Ramos gentoo-dev 2017-12-31 11:27:51 UTC
Thanks a lot!