systemd-sysctl: exit gracefully on EPERM/EACCESS

Bug #1734409 reported by Christian Brauner on 2017-11-25
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Dimitri John Ledkov
Dimitri John Ledkov

Bug Description


 * systemd-sysctl service fails in containers, due to read-only sysfs, which is normal.

[Test Case]

 * Ensure systemd-sysctl is successful in containers, e.g. lxc & lxd

[Regression Potential]

 * The application of sysctls fails anyway, but at least in this case false-errors are not reported and the container doesn't enter "degraded" state without a good reason.

[Other Info]

 * Original bug report

Hi everyone,

systemd-sysctl in systemd versions prior to 232 will exit with FAILED when not being able to apply kernel variables. In containers it should simply move on and exit with SUCCESS. Upstream systemd carries appropriate patches for this already. The relevant commits are:


these should be backported to xenial's systemd.


Changed in systemd (Ubuntu):
status: New → Fix Released
Changed in systemd (Ubuntu Xenial):
assignee: nobody → Dimitri John Ledkov (xnox)
milestone: none → xenial-updates
Changed in systemd (Ubuntu Xenial):
status: New → In Progress
description: updated

Hello Christian, or anyone else affected,

Accepted systemd into xenial-proposed. The package will build now and be available at in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at . Thank you in advance!

Changed in systemd (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Dimitri John Ledkov (xnox) wrote :

root@systemd-sru-xenial:~# systemctl is-failed systemd-sysctl
root@systemd-sru-xenial:~# dpkg-query -W systemd
systemd 229-4ubuntu21.1

root@systemd-sru-xenial:~# dpkg-query -W systemd
systemd 229-4ubuntu21.2
root@systemd-sru-xenial:~# systemctl restart systemd-sysctl
root@systemd-sru-xenial:~# systemctl is-failed systemd-sysctl

tags: added: verification-done verification-done-xenial
removed: verification-needed verification-needed-xenial
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 229-4ubuntu21.2

systemd (229-4ubuntu21.2) xenial; urgency=medium

  [ Dimitri John Ledkov ]
  * udev: Mark ndb devices as inactive until connected. (LP: #696435)
  * networkd: in dhcp, change UseMTU default to true, to accept DHCP provided MTU by default.
    (LP: #1717471)
  * sysctl: apply parameters in-order, instead of randomly. (LP: #1718444)
  * networkd: apply promote_secondaries, to make DHCP lease changes work.
    (LP: #1721223)
  * shutdown: sync filesystems, before going into a killing spree.
    (LP: #1722481)
  * sysctl: do not fail, when cannot apply sysctl changes due to read-only sysfs in containers.
    (LP: #1734409)
  * networkd,wait-online: add RequiredForOnline to mark mandatory/optional links for boot.
    (LP: #1737570)

  [ David Glasser ]
  * journald: don't reduce BurstRateLimit on low disk space (LP: #1732803)

 -- Dimitri John Ledkov <email address hidden> Wed, 21 Feb 2018 13:46:37 +0000

Changed in systemd (Ubuntu Xenial):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for systemd has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers