Skip to content

feat: install waagent via wireserver#7987

Merged
mxj220 merged 30 commits intomainfrom
markibrahim/install-waagent-via-manifest
Mar 6, 2026
Merged

feat: install waagent via wireserver#7987
mxj220 merged 30 commits intomainfrom
markibrahim/install-waagent-via-manifest

Conversation

@mxj220
Copy link
Contributor

@mxj220 mxj220 commented Feb 27, 2026

Upgrades WALinuxAgent through manifest to preserve existing configurations but support the latest features (including FIPS 140-3 compatibility). Upgrading during build means that the customer faces no waagent update delays during AKS boot, as the latest version is baked into the VHD.

This update also blocks the WALinuxAgent from automatically updating afterwards.
What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Copy link
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

Adds support for installing/upgrading WALinuxAgent via the Azure wireserver manifest and running the install post-deprovision during VHD build, with accompanying VHD validation and regenerated CustomData snapshots.

Changes:

  • Update packer deprovision steps to optionally run a post-deprovision WALinuxAgent install script.
  • Add installWALinuxAgent (wireserver/manifest-based) and a VHD content test validating the cached agent + waagent.conf settings.
  • Add a walinuxagent entry to components.json, update build logging, capture waagent logs in e2e, and regenerate snapshot testdata.

Reviewed changes

Copilot reviewed 51 out of 78 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
vhdbuilder/packer/vhd-image-builder-mariner.json Run post-deprovision WALinuxAgent install after waagent deprovision.
vhdbuilder/packer/vhd-image-builder-mariner-cvm.json Same post-deprovision WALinuxAgent install hook (Mariner CVM).
vhdbuilder/packer/vhd-image-builder-mariner-arm64.json Same post-deprovision WALinuxAgent install hook (Mariner arm64).
vhdbuilder/packer/vhd-image-builder-cvm.json Same post-deprovision WALinuxAgent install hook (Ubuntu CVM).
vhdbuilder/packer/vhd-image-builder-base.json Same post-deprovision WALinuxAgent install hook (Ubuntu base).
vhdbuilder/packer/vhd-image-builder-arm64-gen2.json Same post-deprovision WALinuxAgent install hook (Ubuntu arm64 gen2).
vhdbuilder/packer/test/linux-vhd-content-test.sh Add WALinuxAgent validation in VHD content tests.
vhdbuilder/packer/pre-install-dependencies.sh Add OS variant detection.
vhdbuilder/packer/install-dependencies.sh Add walinuxagent handling/logging in package loop.
vhdbuilder/packer/cleanup-vhd.sh Generate post-deprovision WALinuxAgent install script driven by components.json.
pkg/agent/testdata/MarinerV2+Kata/CustomData Regenerated CustomData snapshot.
pkg/agent/testdata/MarinerV2+CustomCloud/CustomData Regenerated CustomData snapshot.
pkg/agent/testdata/Flatcar/CustomData.inner Regenerated CustomData snapshot.
pkg/agent/testdata/CustomizedImageLinuxGuard/CustomData Regenerated CustomData snapshot.
pkg/agent/testdata/CustomizedImageKata/CustomData Regenerated CustomData snapshot.
pkg/agent/testdata/CustomizedImage/CustomData Regenerated CustomData snapshot.
parts/linux/cloud-init/artifacts/cse_install.sh Add manifest-based installWALinuxAgent implementation.
parts/common/components.json Add walinuxagent downloadLocation entry.
e2e/vmss.go Collect /var/log/waagent.log in VM log extraction.

@github-actions github-actions bot added the components This pull request updates cached components on Linux or Windows VHDs label Feb 27, 2026
Copilot AI review requested due to automatic review settings February 27, 2026 22:03
Copy link
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 51 out of 78 changed files in this pull request and generated 11 comments.

Copy link
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 11 out of 11 changed files in this pull request and generated 4 comments.

@jepio
Copy link
Member

jepio commented Mar 4, 2026

This update also blocks the WALinuxAgent from automatically updating afterwards.

I think this is a good idea (predictability, consistency, less work during first boot), I just want to call out for everyone's awareness that this means all nodepools running not-the-latest image versions will not get WALinuxAgent updates during their lifetime. Even when scaling existing nodepools, new nodes running older images will still be running the same waagent version.

Copilot AI review requested due to automatic review settings March 4, 2026 17:44
Copy link
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 11 out of 11 changed files in this pull request and generated 1 comment.

Copilot AI review requested due to automatic review settings March 4, 2026 18:08
Copy link
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 11 out of 11 changed files in this pull request and generated 2 comments.

Copy link
Contributor

@awesomenix awesomenix left a comment

Choose a reason for hiding this comment

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

Everything looks good apart from AutoUpgradeToLatestVersion case.

@mxj220 mxj220 merged commit 43e7022 into main Mar 6, 2026
66 of 70 checks passed
@mxj220 mxj220 deleted the markibrahim/install-waagent-via-manifest branch March 6, 2026 16:57
aadhar-agarwal added a commit that referenced this pull request Mar 7, 2026
PR #7987 added post-deprovision WALinuxAgent install but the guard in
packer_source.sh only excluded Flatcar, not ACL. ACL also does not
upload these files via its packer JSON, causing the same exit code 113
failure pattern. Adds isACL to the guard and skips testWALinuxAgentInstalled
for AzureContainerLinux.

Signed-off-by: Aadhar Agarwal <aadagarwal@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

components This pull request updates cached components on Linux or Windows VHDs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants