fix(linux): allow secondary nics to be configured on boot#8642
Open
jumpinthefire wants to merge 1 commit into
Open
fix(linux): allow secondary nics to be configured on boot#8642jumpinthefire wants to merge 1 commit into
jumpinthefire wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds Linux provisioning support to bring up standard-type secondary NICs at boot on AKS VHDs, which otherwise won’t be configured automatically because AKS images disable cloud-init network management (Ubuntu) and restrict networkd DHCP to eth0 (AzureLinux/Mariner).
Changes:
- Invoke
configureSecondaryNICsduringnodePrepafter Azure network udev configuration. - Implement
configureSecondaryNICsto read NICs from cached IMDS metadata and configure DHCP for secondary interfaces:- Ubuntu: generate netplan config files and apply them.
- AzureLinux/Mariner: generate systemd-networkd
.networkunits and bring interfaces up.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| parts/linux/cloud-init/artifacts/cse_main.sh | Calls configureSecondaryNICs during node provisioning. |
| parts/linux/cloud-init/artifacts/cse_config.sh | Adds configureSecondaryNICs implementation (IMDS → netplan/networkd). |
awesomenix
reviewed
Jun 5, 2026
awesomenix
approved these changes
Jun 5, 2026
Signed-off-by: Hossam Rabbouh <horabbouh@microsoft.com>
b223667 to
acbecbb
Compare
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.
What this PR does / why we need it:
We recently added support in AKS RP to provision standard-type (i.e. not delegated, not programmed by CNS) secondary NICs in agent pools. These secondary NICs are given an input subnet and can simply be assigned an IP via DHCP.
On a standard VMSS image, this works fine out of the box. However, the AKS VHDs require additional configuration in order for the NICs to be brought up and and assigned an IP on boot. Currently, the Ubuntu config disables cloud-init and the AZLinux network config is hardcoded to only bring up eth0.
This PR adds scripting logic to query cached IMDS data and write the necessary config to boot up each secondary interface. Delegated NICs don't appear in IMDS so this should not cause any conflcit with CNS-owned NICs.