systemd-sysctl in Xenial is not obeying the order of the sysctls

Bug #1718444 reported by Philipp Kern on 2017-09-20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)

Bug Description


 * sysctls are applied out of order

[Test Case]

 * Monitor that sysctls are applied in-order, instead of out of order / random order.

[Regression Potential]

 * Cherrypick of an upstream patch which is present in v232+ and in use in Ubuntu in later releases. The code changes are minimal, updating s/Hashmap/OrderedHashmap/ which is implemented and available in xenial's systemd.

[Other Info]

 * Original bug report.

systemd-sysctl in Xenial forces itself over procps by shipping a link for procps.service to systemd-sysctl.service. However, it does not obey the order both of the files and also of the sysctls within the files. Instead it uses a simple hashmap. As it turns out that's fixed upstream and systemd master uses an ordered hashmap because of this, which at least preserves order within single files. Traditionally files in sysctl.d have been prefixed with numbers to ensure an order and that's now completely non-deterministic on Xenial.

Relevant upstream commit:

Note that conf_files_list_nulstr in master sorts the configuration files using strcmp, so even order of configuration files should be obeyed.

Philipp Kern (pkern) wrote :

This is fixed in v232 and up.

Changed in systemd (Ubuntu):
status: New → Fix Released
Changed in systemd (Ubuntu Xenial):
importance: Undecided → Medium
description: updated
Changed in systemd (Ubuntu Xenial):
status: New → In Progress

Hello Philipp, 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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers