Skip to content

fix(linux): allow secondary nics to be configured on boot#8642

Open
jumpinthefire wants to merge 1 commit into
mainfrom
jumpinthefire/secondary-nics
Open

fix(linux): allow secondary nics to be configured on boot#8642
jumpinthefire wants to merge 1 commit into
mainfrom
jumpinthefire/secondary-nics

Conversation

@jumpinthefire
Copy link
Copy Markdown

@jumpinthefire jumpinthefire commented Jun 5, 2026

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 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 configureSecondaryNICs during nodePrep after Azure network udev configuration.
  • Implement configureSecondaryNICs to 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 .network units 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).

Comment thread parts/linux/cloud-init/artifacts/cse_config.sh
Comment thread parts/linux/cloud-init/artifacts/cse_config.sh Outdated
Comment thread parts/linux/cloud-init/artifacts/cse_config.sh
Copilot AI review requested due to automatic review settings June 5, 2026 16:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 5 out of 5 changed files in this pull request and generated 2 comments.

Comment thread parts/linux/cloud-init/artifacts/cse_main.sh
Comment thread spec/parts/linux/cloud-init/artifacts/cse_config_spec.sh Outdated
Copilot AI review requested due to automatic review settings June 5, 2026 16:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 5 out of 5 changed files in this pull request and generated 3 comments.

Comment thread parts/linux/cloud-init/artifacts/cse_config.sh Outdated
Comment thread parts/linux/cloud-init/artifacts/cse_config.sh Outdated
Comment thread parts/linux/cloud-init/artifacts/cse_config.sh Outdated
Comment thread parts/linux/cloud-init/artifacts/cse_config.sh
Copilot AI review requested due to automatic review settings June 5, 2026 19:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 5 out of 5 changed files in this pull request and generated 1 comment.

Comment thread parts/linux/cloud-init/artifacts/cse_config.sh
@jumpinthefire jumpinthefire enabled auto-merge (squash) June 5, 2026 19:59
Signed-off-by: Hossam Rabbouh <horabbouh@microsoft.com>
@jumpinthefire jumpinthefire force-pushed the jumpinthefire/secondary-nics branch from b223667 to acbecbb Compare June 6, 2026 00:35
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