Bug#754218: boot hangs forever on LSB job "raise network interfaces"

Michael Biebl biebl at debian.org
Sat Jul 26 22:43:51 BST 2014


Am 10.07.2014 17:05, schrieb Stefano Zacchiroli:
> On Wed, Jul 09, 2014 at 05:31:57PM +0200, Michael Biebl wrote:
>> So, try to guard your restarts like this:
>>
>> ===
>> if [ -d /run/systemd/system ]; then
>>        systemctl list-jobs | grep -q network.target && exit 0
>> fi
>> service shorewall restart
>> service shorewall6 restart
>> ===
> 
> This did the trick! (and I quite like the fact that it will work
> properly both with and without systemd running)


I thought about this issue a bit.

It is arguably a bug / configuration error to (re)start a service from a
hook at a point where the dependencies of the service are not yet satisfied.

The resulting dependency loop is silently ignored  by sysvinit, which
isn't great.
The failure mode of systemd to simply "dead lock" isn't great either.

I think we should do two things:

1/ document in the release notes / systemd FAQ that restarting services
from hooks script (ifupdown, dhclient, etc) is problematic.

2/ change invoke-rc.d/service//lib/lsb/init-functions.d/40-systemd to
special case (re)start requests while sysinit.target/network.target is
scheduled (i.e. during early boot), i.e. use --no-block.
This will make systemctl non-blocking and simply enqueue the job.

A sample patch for the lsb init hook is attached


Comments/feedback most welcome.


Michael





-- 
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: lsb-init-hook.diff
Type: text/x-patch
Size: 1112 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20140726/d210d4fa/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20140726/d210d4fa/attachment-0002.sig>


More information about the Pkg-systemd-maintainers mailing list