Skip to content

systemd: Be consistent and complete in excluding virtual NICs - #145

Merged
chewi merged 3 commits into
flatcar-masterfrom
chewi/networkd
Aug 31, 2026
Merged

systemd: Be consistent and complete in excluding virtual NICs#145
chewi merged 3 commits into
flatcar-masterfrom
chewi/networkd

Conversation

@chewi

@chewi chewi commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Only virtual NICs have a Kind, so just exclude all of them by wildcard instead of explicitly naming them. systemd.netdev(5) says there are currently 37 of them! These include the Drivers and Types we were previously excluding, apart from loopback.

Also replace the legacy KeepConfiguration=dhcp-on-stop with dynamic-on-stop and make oem-cloudinit.service a bit less ugly.

Tested in CI and manually with QEMU and Proxmox.

@chewi chewi self-assigned this Aug 26, 2026
Copilot AI lite review requested due to automatic review settings August 26, 2026 09:33
@chewi
chewi requested a review from a team as a code owner August 26, 2026 09:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR simplifies systemd-networkd match rules to consistently exclude all virtual NICs via Kind wildcards, updates network configuration retention semantics, and refactors the cloud-init OEM service logic for readability.

Changes:

  • Replace explicit virtual-interface exclusion lists with a Kind=!?* wildcard exclusion in .network files.
  • Switch KeepConfiguration from dhcp-on-stop to dynamic-on-stop across relevant network units.
  • Simplify oem-cloudinit.service OEM selection logic using case statements.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
systemd/system/oem-cloudinit.service Refactors OEM detection/mapping logic in ExecCondition/ExecStart.
systemd/network/zz-default.network Uses Kind wildcard exclusion for virtual NICs and updates KeepConfiguration.
systemd/network/yy-vmware.network Aligns VMware network match/exclusion logic with the new Kind approach and updates KeepConfiguration.
systemd/network/yy-pxe.network Aligns PXE network match/exclusion logic with the new Kind approach and updates KeepConfiguration.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread systemd/system/oem-cloudinit.service Outdated
chewi added 3 commits August 26, 2026 10:52
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Only virtual NICs have a Kind, so just exclude all of them by wildcard
instead of explicitly naming them. systemd.netdev(5) says there are
currently 37 of them! These include the Drivers and Types we were
previously excluding, apart from loopback.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
Copilot AI review requested due to automatic review settings August 26, 2026 09:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread systemd/system/oem-cloudinit.service
@chewi
chewi merged commit 3f85814 into flatcar-master Aug 31, 2026
5 checks passed
@chewi
chewi deleted the chewi/networkd branch August 31, 2026 11:22
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.

3 participants