You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In all your service files, After=network.target should be After=network-online.target.
Failure to do so will lead to flaky, unpredictable behaviour.
See man systemd.special, it says of network.target that:
This unit is supposed to indicate when network functionality is available, but it is only very weakly defined
And the rest of the man-page section about network.target basically appears to imply you should only rely on it during the shutdown process, not during boot.
Meanwhile the man systemd.special on network-online.target is pretty clear, e.g. :
Units that strictly require a configured network connection should pull in network-online.target (via a Wants= type dependency) and order themselves after it.
The text was updated successfully, but these errors were encountered:
After= is simply ordering, Wants= provides the actual hard-dependency.
So best practice in situations such as network-online is indeed to have both, because you actually want the actual hard-dependency for obvious reasons. 😉
In all your service files,
After=network.target
should beAfter=network-online.target
.Failure to do so will lead to flaky, unpredictable behaviour.
See
man systemd.special
, it says ofnetwork.target
that:And the rest of the man-page section about
network.target
basically appears to imply you should only rely on it during the shutdown process, not during boot.Meanwhile the
man systemd.special
onnetwork-online.target
is pretty clear, e.g. :The text was updated successfully, but these errors were encountered: