Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#59304 - [netctl] netctl-ifplugd@.service should be changed to Type=notify
Attached to Project:
Arch Linux
Opened by Dimitrios Apostolou (jimis) - Wednesday, 11 July 2018, 21:14 GMT
Last edited by Jouke Witteveen (jouke) - Tuesday, 07 August 2018, 15:51 GMT
Opened by Dimitrios Apostolou (jimis) - Wednesday, 11 July 2018, 21:14 GMT
Last edited by Jouke Witteveen (jouke) - Tuesday, 07 August 2018, 15:51 GMT
|
DetailsIn file `/usr/lib/systemd/system/netctl-ifplugd@.service` we see that `NotifyAccess=all`.
However, doing `systemctl show netctl-ifplugd@eth0.service` we see that `Type=simple` which means that systemd automatically considers the service as active just right after the ifplugd process has started, without waiting for any notification. Things misbehave: other services start without netctl's DHCP client being finished; netctl's `WaitOnline` directive has no effect, etc. Solution is to apply the following patch: --- /usr/lib/systemd/system/netctl-ifplugd@.service.orig 2018-07-12 00:12:36.401435013 +0300 +++ /usr/lib/systemd/system/netctl-ifplugd@.service 2018-07-12 00:12:58.069435016 +0300 @@ -5,6 +5,7 @@ After=sys-subsystem-net-devices-%i.device network-pre.target [Service] +Type=notify NotifyAccess=all ExecStart=/usr/bin/ifplugd -i %I -r /etc/ifplugd/netctl.action -bfIns |
This task depends upon
In other words, netctl-ifplugd is not compatible with network-online.target, but the current state of the network can be read from its status line.
Why not? Especially if the user is trying exactly that, by setting "WaitOnline" in netctl? This is not default behaviour.
systemd expects that services are up when they are finished, and suggests the use of "notify" type in order to achieve this. Otherwise things misbehave in really subtle ways.
For example network-dependent services fail on boot and spit errors to syslog, get retried and succeed later. It took me a while to find out that other services that depend on them never even get started not even once, because of "unsatisfied dependencies".
So you are saying that the reason it is "simple" type service is to avoid delaying boot. Is there anyone using ifplugd that really wants the network services to be started even without network? It's not like the system is not booting properly, the console (serial or tty) should come up despite the network being down.
I have customised my system to suit my needs, the reason I submitted the patch here is to fix upstream and save trouble for others. So if you think there is no problem feel free to close this.
I am afraid that is not how network.target works. Using network-online.target this way is bound to get you in trouble with time-outs.
> So you are saying that the reason it is "simple" type service is to avoid delaying boot. Is there anyone using ifplugd that really wants the network services to be started even without network? It's not like the system is not booting properly, the console (serial or tty) should come up despite the network being down.
It is 'simple' because it cannot be anything else with systemd. It certainly cannot be 'notify' with ifplugd, as it would time-out when no cable is plugged in, taking the entire system with it. What you want is a daemon monitoring for a connection to go down. Such a daemon may be nice to have, but it is not netctl-ifplugd. In particular, netctl-ifplugd services are not stopped when a cable is pulled. They should not be, because they are waiting for a cable to be plugged in again!