Bug#1000510: systemd: all server programs fail when they are set to specified interfaces
On Fri, 26 Nov 2021 00:57:09 -0500 westlake wrote: there is new criteria I can add to this original bugreport: here I did additional tests and noticed new light of observations that your override does not take effect for ifupdown(networking.service), even though it should by the information you have provided. the summary I can make of things so far regarding this is, 1) the override (from your suggestion of After=, Wants=) only works only when the user opts to adopt "systemd-networkd" and I'm pretty sure it works with NetworkManager as well (which provides NetworkManager-wait-online.service, which hooks into network-online.target). 2) the override does nothing when the user stays with the default networking.service (it is supposed to but it doesn't) ^ According to you the systemd override should work whether the user uses networking.service or systemd-networkd -- but this isn't happening. Well, obviously networking.service (as provided by ifupdown) needs to hook into network-online.target for this target to be useful. Please read the documentation at https://systemd.io/NETWORK_ONLINE/ In case of ifupdown, you probably want to enable ifudpown-wait-online.service or use type auto. That said, I don't use ifupdown anymore, so can't really help you with its configuration. Michael OpenPGP_signature Description: OpenPGP digital signature
Bug#1000510: systemd: all server programs fail when they are set to specified interfaces
Package: systemd Version: 247.3-6 Severity: important systemd-networkd causes issues around services that do not have "network-online.target" as part of "Wanted=" in their unit file. For example, apache2.service has the following under their [Unit] in apache2.service, "After=network.target remote-fs.target nss-lookup.target" , this is invalid, as it should rather be:: "After=network.target network-online.target remote-fs.target nss-lookup.target" same goes for ssh.service "After=network.target auditd.service", should be "After=network.target network-online.target auditd.service" and for any other service omitting network-online.target.. . otherwise those services will say "fail" on boot-up.. without any other further detail. journactl -xe -u doesn't show any further detail other that the service failed to "bind" to an address. ^ The ssh service I have set is set to bind to a "specific" interface that is defined by systemd-networkd's settings in /etc/systemd/network. (networkctl was shows fully configured interfaces, so there is no issue happening over here) The apache2 service is also set to bind to a "specific" interface. ^ By default these services run on 0.0.0.0 -- to run on all interfacaes, including 127.0.0.1 << which is pretty much ready much earlier. This explains as to why there is failure when the user defines specified interfaces later on. .. whoever is in charge of systemd, should inform other server-package maintainers to add "network-online.target" as a dependency-check otherwise those services will fail to start when the user decides to use specific interfaces. thanks