reassign 766943 to systemd

Christoph Anton Mitterer calestyo at scientia.net
Sat Nov 22 22:49:58 GMT 2014


On Mon, 2014-11-10 at 04:36 +0100, Michael Biebl wrote: 
> To provide such a syncronisation point, i.e. having network.target and
> network-online.target [1] properly hooked up, I've implemented a PoC
> ifupdown-wait-online service. You can get it from [2] and enable it via
> "systemctl enable ifupdown-wait-online.service".
> 
> This service is hooked up into network.target and network-online.target
> and blocks until one interface has been successfully configured or a
> timeout is reached.
> SysV init scripts which require $network will therefore be started after
> at least one interface has been configured, no matter if auto or
> allow-hotplug.
> 
> As said, this is  PoC and we can further discuss what "network up"
> actually is supposed to mean: one interface up, all interfaces up, etc.
That's why I hate network.target, network-online.target and especially
network-pre.target.
They're far too vaguely defined which makes their use very problematic.
Especially network-pre.target brings systemd IMHO[0] kinda back into the
stone-age of sysvinit schemes.


Your PoC seems nice,... but I guess it just tries to work-around a quite
broken situation:
- Basically we must expect that a network interface appears anywhere in
time,... even long after boot.
- services may depend on these very interfaces, especially when they
directly bind to it for listening, it's typical that daemons do this
only once in the beginning, and they often even fail if they can't.
Using NICs that appear later for outgoing connections is probably less
of a problem for such services.

The ideal situation might be, that daemons should start even if they
can't bind to their addresses, continue doing nothing while polling if
the interface becomes available.
That would have the nice effect that we don't need to serialise any
longer with network.target or have any hotplug issues.
But I doubt that (all) services will do so during my lifetime ;-)


So for the long term, we must assure, that if systemd runs a service
that does networking, the NICs are available.

Which? Good question.
"One" as you did it in your PoC is probably not enough.
Take my server, I use different IPs (v4 and v6) for vhosted services, so
many of them need to be up, for Apache to start.


Maybe an idea is really to educate people the following:
- If you have services that statically bind to an interface once they're
started up (i.e. classic daemons which do no polling and reconfiguration
when they discover new network interface) -> only allow-auto/auto is
guaranteed to be brought up.
- Use allow-hotplug only for such cases, where all networking is
dynamically discovered over and over again.



Cheers,
Chris.


[0] see my top comment there https://plus.google.com/111049168280159033135/posts/7467oqXVoTS
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5313 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20141122/ecd16b4b/attachment-0002.bin>


More information about the Pkg-systemd-maintainers mailing list