wait for udev settle before restarting networkd#936
Merged
Conversation
When using systemd-networkd, restarting networkd immediately after systemd-udev-trigger can race with udev event processing. This can cause networkd to compute DHCPv6 IAID before ID_NET_NAME_* properties are fully restored, leading to intermittent IAID mismatch. Add a udev settle barrier before restarting networkd: - restart systemd-udev-trigger - udevadm settle --timeout=5 - restart systemd-networkd Signed-off-by: Aritra Basu <aritrbas@cisco.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes an intermittent startup race for
systemd-networkdenvironments. When usingsystemd-networkd, restartingnetworkdimmediately aftersystemd-udev-triggercan race with udev event processing. This can cause networkd to compute DHCPv6 IAID beforeID_NET_NAME_*properties are fully restored, leading to intermittent IAID mismatch.RCA
systemctl restart systemd-udev-triggerdoes not guarantee that all queued udev events are fully processed when the command returns. Without waiting for udev completion,systemctl restart systemd-networkdcan run too early and intermittently produce IAID mismatch without theID_NET_NAME_*properties being fully restored.Fix
Add a
udev settlebarrier before restartingnetworkd:This improves ordering by waiting for udev queue completion.