[systemd-devel] [PATCH] sysv-generator: avoid wrong orderings for failing units

Michael Biebl mbiebl at gmail.com
Wed Jan 7 04:44:17 PST 2015

Uoti rightfully pointed out, that the commit message is bogus. The
incorrect orderings are not due to
services which failed to load, but rather use before initialization.

 A proper explanation goes like this:

sysv-generator: initialize units before use to ensure correct

The original loop called fix_order() on each service immediately after
loading it, but fix_order() would reference other units which were not
loaded yet.
This resulted in bogus and unnecessary orderings based on the static
start priorities.

Therefore call load_sysv() for every init script when traversing them in
enumerate_sysv().  This ensures all units are loaded when fix_order() is

Bug-Debian: https://bugs.debian.org/771118

I've updated the commit message accordingly. See attached patch.

2015-01-06 17:58 GMT+01:00 Martin Pitt <martin.pitt at ubuntu.com>:
> Hello all,
> Michael Biebl [2015-01-05 10:51 +0100]:
>> If a service fails to load, we skip fix_order() and the generator uses
>> the static start priorities. This induces bogus orderings against
>> unrelated services. So instead, just don't add a service to the
>> all_services hash_map, if it fails to load.
>> Bug-Debian: https://bugs.debian.org/771118
> Just saying that Debian/Ubuntu has that patch in production since Nov
> 28 without any problems, and it's quite easy to reproduce.
> Thanks Michael!
> Martin
> --
> Martin Pitt                        | http://www.piware.de
> Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-sysv-generator-initialize-units-before-use-to-ensure.patch
Type: text/x-patch
Size: 1822 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150107/2d25750d/attachment.bin>

More information about the systemd-devel mailing list