Bug#752919: networking scripts runs ifup for hotplugged interfaces, races with net.agent from udev
Michael Biebl
biebl at debian.org
Sat Jun 28 18:11:46 BST 2014
Am 28.06.2014 18:32, schrieb Andrew Shadura:
> Hello,
>
> On Fri, 27 Jun 2014 21:13:40 +0200
> Michael Biebl <biebl at debian.org> wrote:
>
>> the udev package ships a udev rule [1], which runs ifup $INTERFACE via
>> the net.agent helper.
>
>> This seems to create a race with the networking SysV init script which
>> runs also runs ifup for hotplugged interfaces in ifup_hotplug().
>
> Yes, I've noticed that quite a while ago, but haven't found a good way
> to resolve the issue.
Can't you just drop if_hotplug() from the networking SysV init script?
Is there any downside if you do so?
>> Is there a need to ifup allow=hotplug interfaces from within the
>> networking init script, seeing that net.aget / 80-networking.rules
>> already cover hotplugged interfaces?
>
> Even if I remove that, there's still probability of races, as net.agent
> blocks on the state of the real interface, while it should wait for
> ifupdown to do its job first.
Not quite sure I see the race here, can you elaborate?
>> Aside from that, I do think that it would make sense to move net.agent
>> and 80-networking.rules from udev into ifupdown proper.
>
>> What do you think?
>
> Yes, I think I need to take that script over and fix that. Thanks for
> filing a bug.
Ok, I guess we need to coordinate that then as a separate issue.
Also given that systemd will be our default init for jessie, we need to
improve the current systemd integration. E.g. we should ship a native
.service file for the networking init script handling the non-hotplug
interfaces. For hotplug interfaces we already have a native ifup at .service.
We also need think about how to properly daemons which require $network
(or network.target in systemd).
I have a PoC at [1] which provides a ifupdown-wait-online service.
The implementation is pretty basic, e.g. the criteria for network-up is
simply that one interface is up (no matter if hotplugged or auto).
Tollef mentioned, that we should probably refine that, e.g. add
additional checks for a default gateway or wait for both IPv6 and IPv4
configuration (given the interface is configured that way).
As said, it's a prove of concept and would be interested in your
feedback. Ideally this would go into ifupdown itself.
I hope you are open to work with us on improving the systemd/ifupdown
integration.
Michael
[0] http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
[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://lists.alioth.debian.org/pipermail/pkg-systemd-maintainers/attachments/20140628/536f3602/attachment.sig>
More information about the Pkg-systemd-maintainers
mailing list