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

Michael Biebl biebl at debian.org
Wed Jul 9 16:31:57 BST 2014


Am 09.07.2014 16:45, schrieb Stefano Zacchiroli:
> On Wed, Jul 09, 2014 at 02:04:49PM +0200, Michael Biebl wrote:
>> What's the output of
>>  ls -la /etc/rc?.d/???shorewall
>> and
>>  ls -la /etc/rc?.d/???shorewall6
> 
>   $ ls -la /etc/rc?.d/???shorewall
>   lrwxrwxrwx 1 root root 19 apr 27 15:43 /etc/rc0.d/K01shorewall -> ../init.d/shorewall
>   lrwxrwxrwx 1 root root 19 apr 27 15:43 /etc/rc6.d/K01shorewall -> ../init.d/shorewall
>   lrwxrwxrwx 1 root root 19 apr 27 15:43 /etc/rcS.d/S21shorewall -> ../init.d/shorewall
> 
>   $ ls -la /etc/rc?.d/???shorewall6
>   lrwxrwxrwx 1 root root 20 apr 27 15:44 /etc/rc0.d/K01shorewall6 -> ../init.d/shorewall6
>   lrwxrwxrwx 1 root root 20 apr 27 15:44 /etc/rc6.d/K01shorewall6 -> ../init.d/shorewall6
>   lrwxrwxrwx 1 root root 20 apr 27 15:44 /etc/rcS.d/S21shorewall6 -> ../init.d/shorewall6
> 
>> And the output of
>>  systemctl status shorewall.service shorewall6.service
> 
>   $ systemctl status shorewall.service shorewall6.service
> 
>   shorewall.service - LSB: Configure the firewall at boot time
>      Loaded: loaded (/etc/init.d/shorewall)
>      Active: failed (Result: exit-code) since mer 2014-07-09 16:42:17 CEST; 1min 26s ago
>     Process: 1255 ExecStart=/etc/init.d/shorewall start (code=exited, status=1/FAILURE)
> 
>   shorewall6.service - LSB: Configure the firewall at boot time
>      Loaded: loaded (/etc/init.d/shorewall6)
>      Active: active (exited) since mer 2014-07-09 16:43:28 CEST; 15s ago
>     Process: 6089 ExecStop=/etc/init.d/shorewall6 stop (code=exited, status=0/SUCCESS)
>     Process: 6160 ExecStart=/etc/init.d/shorewall6 start (code=exited, status=0/SUCCESS)
> 
> Note: I'm fine with the fact that shorewall(s) might return a non-0 exit
> code at boot time, due to the lack of connectivity, but I'd like for the
> service not to be put in a state where it does not start later on, ever.

That is a bit odd. The SysV should only be run once the networking
service init script has started.

The problem most likely here is, that you use allow-hotplug. You'd need
something like [1] which actively blocks until you actually have a
network connection.


Anyway, since apparently your shorewall.service is *not* successfully
started during boot, the "service shorewall status && service shorewall
restart" workaround will indeed not work.

In that case you could apply the same workaround that was done for the
mountnfs hook, i.e. do not trigger a restart of the shorewall service
while the networking init script is still being started, i.e.
network.target job is currently being scheduled and not yet running.

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
===




[1] http://people.debian.org/~biebl/ifupdown-wait-online.tar.gz
-- 
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: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20140709/92fffaa3/attachment-0002.sig>


More information about the Pkg-systemd-maintainers mailing list