generate: sriov: execute udev rules before starting sriov apply service#569
Merged
benhoyt merged 1 commit intocanonical:mainfrom Feb 12, 2026
Merged
Conversation
netplan-sriov-apply.service already depends on .device units to start its execution. However that unit does not guarantee that expected interface names are already set. As a result netplan might hit race condition with udev rules processing and interface name can change when service is running. This can cause multiple issues in apply_sriov_config function. For instance netplan will fetch current PF names and will try to configure them according to the config, however if name changes during that process, netplan will crash when trying to get pci slot name. This issue is not visible outside of netplan-sriov-apply.service because netplan apply command will explicitly trigger udev rules and wait for it to finish (before process_sriov_config call). Proposed change modifies netplan-sriov-apply.service generation to execute udev rules, instead of directly calling it in code, to explicitly show dependencies on udev rule execution. LP2139598
Contributor
|
Thanks @rmalz-c for the effort you put into this! the approach is as discussed, provides an isolated solution and lgtm! |
benhoyt
approved these changes
Feb 12, 2026
Collaborator
benhoyt
left a comment
There was a problem hiding this comment.
We've reviewed and Jegadish discussed with Robert. Looks good (and separately we'll get more context on the project).
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.
netplan-sriov-apply.service already depends on .device units to start its execution. However that unit does not guarantee that expected interface names are already set. As a result netplan might hit race condition with udev rules processing and interface name can change when service is running. This can cause multiple issues in apply_sriov_config function. For instance netplan will fetch current PF names and will try to configure them according to the config, however if name changes during that process, netplan will crash when trying to get pci slot name.
This issue is not visible outside of netplan-sriov-apply.service because netplan apply command will explicitly trigger udev rules and wait for it to finish (before process_sriov_config call).
Proposed change modifies netplan-sriov-apply.service generation to execute udev rules, instead of directly calling it in code, to explicitly show dependencies on udev rule execution.
LP2139598