-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
nixos/networkd: reload instead of restarting #194811
Conversation
When its configuration files change, reload systemd-networkd (`networkctl reload`) instead of restarting it. This fixes the following race condition with the current setup during activation: - systemd-networkd.service is stopped - ⚠ someone calls `networkctl`, which immediately restarts networkd, which reconfigures itself using the *old* /etc - the new /etc is set up - systemd-networkd.service is started (doing nothing)
c17e753
to
836c0e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did not test, but LGTM
I'm not sure if a reload properly reconfigures everything necessary. Did you see systemd/systemd#13452 (comment) ? |
Hmm, I did not. I wonder if |
Seems like |
Do we still want to proceed with this method of reloading? I would say removing existing netdevs is not a big deal compared to the advantages we got with this PR. |
Closing since the network service has since been refactored to distinguish between units that need reload or restart respectively. Furthermore, #359724 should fix any remaining issues. |
When its configuration files change, reload systemd-networkd (
networkctl reload
) instead of restarting it.This fixes the following race condition during activation:
networkctl
, which immediately restarts networkd, which reconfigures itself using the old /etc