Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix race with interfaces going up. #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

woutershep
Copy link

From https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

network-pre.target is a target that may be used to order services
before any network interface is configured. Its primary purpose is for
usage with firewall services that want to establish a firewall before
any network interface is up. It's a passive unit: you cannot start it
directly and it is not pulled in by the the network management service,
but by the service that wants to run before it. Network management
services hence should set After=network-pre.target, but avoid any
Wants=network-pre.target or even Requires=network-pre.target. Services
that want to be run before the network is configured should place
Before=network-pre.target and also set Wants=network-pre.target to pull
it in. This way, unless there's actually a service that needs to be
ordered before the network is up the target is not pulled in, hence
avoiding any unnecessary synchronization point.

From https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

network-pre.target is a target that may be used to order services
before any network interface is configured. Its primary purpose is for
usage with firewall services that want to establish a firewall before
any network interface is up. It's a passive unit: you cannot start it
directly and it is not pulled in by the the network management service,
but by the service that wants to run before it. Network management
services hence should set After=network-pre.target, but avoid any
Wants=network-pre.target or even Requires=network-pre.target. Services
that want to be run before the network is configured should place
Before=network-pre.target and also set Wants=network-pre.target to pull
it in. This way, unless there's actually a service that needs to be
ordered before the network is up the target is not pulled in, hence
avoiding any unnecessary synchronization point.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant