Skip to content

feat: onboard ubuntu2604 cvm - #9385

Merged
Zachary (zachary-bailey) merged 59 commits into
mainfrom
zb/onboard2604CVM
Sep 18, 2026
Merged

Zachary (zachary-bailey) merged 59 commits into
mainfrom
zb/onboard2604CVM

Conversation

@zachary-bailey

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

This PR onboards CVM 2604 CVM

Which issue(s) this PR fixes:

Need support for Ubuntu 2604 CVM

Fixes #

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Windows Unit Test Results

  3 files   17 suites   1m 2s ⏱️
484 tests 484 ✅ 0 💤 0 ❌
487 runs  487 ✅ 0 💤 0 ❌

Results for commit 2c041cc.

♻️ This comment has been updated with latest results.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new CVM artifact needs an E2E provisioning scenario validating boot and node bootstrap.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds Ubuntu 26.04 CVM support across AgentBaker distro mapping, SIG resolution, tests, and release pipelines.

Changes:

  • Registers the Ubuntu 26.04 CVM distro and SIG image.
  • Adds unit coverage for classification and API mappings.
  • Adds the CVM release build job.
File summaries
File Description
pkg/agent/datamodel/types.go Registers the Ubuntu 26.04 CVM distro.
pkg/agent/datamodel/types_test.go Tests Ubuntu 26.04 classification.
pkg/agent/datamodel/sig_config.go Configures SIG mappings and capabilities.
pkg/agent/datamodel/sig_config_test.go Validates the SIG configuration.
pkg/agent/bakerapi_test.go Covers API distro resolution.
.pipelines/.vsts-vhd-builder-release.yaml Adds the CVM release build job.
Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

useOverrides: ${{ parameters.useOverrides }}
overrideBranch: ${{ parameters.overrideBranch }}
artifactName: 2604-minimal-arm64-gen2-containerd
- job: build2604cvmgen2containerd

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The new CVM path lacks pre-merge build and provisioning coverage, and global VHD build retries were removed.

Review details

Suppressed comments (3)

.pipelines/templates/.builder-release-template.yaml:119

  • 🟡 Medium Risk — VHD build reliability: The same retry removal also makes every Image Customizer build fail on its first transient infrastructure error, while downstream publishing remains retryable. Keep the existing three retries unless this global reliability policy is intentionally changed and validated separately.
    displayName: Build VHD - Image Customizer

.pipelines/.vsts-vhd-builder-release.yaml:818

  • 🔴 High Risk — 🧪 Test Coverage: This adds the CVM only to the release pipeline. The PR pipeline (.pipelines/.vsts-vhd-builder.yaml) has no matching build job, and e2e/config/vhd.go plus the scenarios have no image for 2604minimalgen2CVMcontainerd. As a result, the 306-package purge and FDE-kernel replacement are not exercised on an actual CVM before merge, and release E2E cannot provision this image. Add the corresponding PR build and a CVM boot/provision smoke scenario.
      - job: build2604minimalcvmgen2containerd

.pipelines/templates/.builder-release-template.yaml:99

  • 🟡 Medium Risk — VHD build reliability: Removing the task retry makes every Packer-based Linux VHD build fail on the first transient Azure or network error. This is a repository-wide behavior change unrelated to the 26.04 CVM onboarding, and later publish/prefetch tasks still retain three retries. Restore the retry here or move this policy change to a separately justified PR.
    displayName: Build VHD
  • Files reviewed: 17/17 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The unrelated removal of retries weakens reliability for every Linux VHD build path.

Review details

Suppressed comments (2)

.pipelines/templates/.builder-release-template.yaml:99

  • The PR only onboards Ubuntu 26.04 CVM, but this also removes automatic retries from the Packer build used by every Linux SKU. A transient Azure/Packer failure will now fail the full release job instead of being retried; please restore the retry here or move this system-wide reliability change to a separately justified PR.
    displayName: Build VHD

.pipelines/templates/.builder-release-template.yaml:119

  • This independently removes retries from Image Customizer builds for all Linux SKUs, although the PR scope is Ubuntu 26.04 CVM onboarding. Transient build failures will become terminal for this path as well; please preserve the existing retry policy unless this broader operational change is intentional and reviewed separately.
    displayName: Build VHD - Image Customizer
  • Files reviewed: 17/17 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The release-enabled CVM image lacks a PR integration build covering its destructive package and kernel transitions.

Review details

Suppressed comments (1)

.pipelines/.vsts-vhd-builder-release.yaml:819

  • 🟡 Medium Risk — 🧪 Test Coverage: This new image is enabled by default in the release pipeline, but the PR VHD pipeline (.pipelines/.vsts-vhd-builder.yaml:143-162) only builds the non-CVM 26.04 image. Consequently, PR validation never exercises the server-cvm base image, the real package purge, the FDE kernel transition, or the reboot; the ShellSpec test mocks dpkg-query and apt, so it cannot catch failures in those operations. Add this CVM variant to PR VHD validation (or an equivalent gated integration build) before enabling its release job.
      - job: build2604minimalcvmgen2containerd
        condition: eq('${{ parameters.build2604minimalcvmgen2containerd }}', true)
  • Files reviewed: 16/16 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The removal list purges dependencies of required packages, causing the CVM build or final verification to fail.

Get a fresh assessment by requesting another Copilot review.

Review details
  • Files reviewed: 16/16 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Package trimming and kernel replacement can remove dependencies required by final validation, causing the new VHD build to fail.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (1)

vhdbuilder/packer/ubuntu-2604-cvm/2604-minimal-cvm-marked-for-removal-packages.txt:151

  • 🔴 High Risk — Script Logic: This removes libpcap0.8t64, but the required list retains tcpdump, which directly depends on this library on Ubuntu 26.04. APT will remove tcpdump to satisfy this purge (--no-auto-remove does not preserve reverse dependencies), so the subsequent required-package verification aborts every affected VHD build. Retain this library, or reinstall tcpdump before verification.
libpcap0.8t64
  • Files reviewed: 16/16 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread vhdbuilder/packer/pre-install-dependencies.sh

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The removal manifest purges libpcap0.8t64, which removes required tcpdump and blocks the VHD build.

Review details

Suppressed comments (1)

vhdbuilder/packer/ubuntu-2604-cvm/2604-minimal-cvm-marked-for-removal-packages.txt:151

  • 🔴 High Risk — Script Logic: Ubuntu 26.04 tcpdump depends on libpcap0.8t64, while tcpdump is explicitly required by this PR. Purging this library makes apt remove tcpdump as a reverse dependency, so the trim step will then fail at apt-mark manual tcpdump or at required-package verification and block every affected VHD build. Keep this runtime dependency out of the removal list.
libpcap0.8t64
  • Files reviewed: 17/17 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The unresolved cross-version kernel regression and extensive package removal require end-to-end VHD build and boot validation.

Review details
  • Files reviewed: 17/17 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment on lines 186 to 190
if grep -q "cvm" <<< "$FEATURE_FLAGS"; then
KERNEL_IMAGE="linux-image-azure-fde-lts-${UBUNTU_RELEASE}"
KERNEL_IMAGE="linux-azure-fde-lts-${UBUNTU_RELEASE}"
KERNEL_PACKAGES=(
"linux-image-azure-fde-lts-${UBUNTU_RELEASE}"
"linux-tools-azure-lts-${UBUNTU_RELEASE}"
"linux-cloud-tools-azure-lts-${UBUNTU_RELEASE}"
"linux-headers-azure-lts-${UBUNTU_RELEASE}"
"${KERNEL_IMAGE}"
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Zachary (@zachary-bailey) we confirmed this new logic works fine for other Ubuntu releases right?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The shared CVM kernel logic applies Ubuntu 26.04 package names to existing Ubuntu 24.04 builds.

Review details

Suppressed comments (4)

vhdbuilder/packer/ubuntu-2604-cvm/2604-minimal-cvm-marked-for-removal-packages.txt:151

  • 🔴 High Risk — Script Logic: tcpdump on Ubuntu 26.04 directly depends on libpcap0.8t64, so purging this library also removes tcpdump. The script then runs apt-mark manual ... tcpdump ... under set -e; marking a non-installed package fails, causing every affected VHD build to stop. Keep libpcap0.8t64 (and ideally assert tcpdump in the required-package list) instead of purging its dependency.
libpcap0.8t64

vhdbuilder/packer/pre-install-dependencies.sh:191

  • 🔴 High Risk — Script Logic / Backward Compatibility: This CVM branch now selects linux-azure-fde-lts-${UBUNTU_RELEASE} and the FDE modules-extra package for every supported CVM release, not only 26.04. The repository's 24.04 CVM release notes show the supported kernel as linux-image-azure-fde-lts-24.04 with the non-FDE linux-cloud-tools/headers/tools-azure-lts-24.04 packages (vhdbuilder/release-notes/AKSUbuntu/gen2/2404cvmcontainerd/latest.txt:629-645); therefore apt-cache show at line 216 will miss the new name and skip the purge/install path for existing 24.04 CVM builds. Keep the old package set for pre-26.04 CVM releases and gate the new package names to 26.04.
    KERNEL_IMAGE="linux-azure-fde-lts-${UBUNTU_RELEASE}"
    KERNEL_PACKAGES=(
      "${KERNEL_IMAGE}"
    )
    MODULES_EXTRA_PKG="linux-modules-extra-azure-fde-lts-${UBUNTU_RELEASE}"

vhdbuilder/packer/pre-install-dependencies.sh:191

  • 🔴 High Risk — Script Logic / Backward Compatibility: this branch is selected for every Ubuntu CVM build, not only 26.04. Existing 24.04 CVM images use linux-image-azure-fde-lts-24.04 plus the vanilla linux-tools-azure-lts-24.04/linux-cloud-tools-azure-lts-24.04 packages (see vhdbuilder/release-notes/AKSUbuntu/gen2/2404cvmcontainerd/202609.15.0.txt:629-644); with these new names, apt-cache show at line 216 will miss the kernel/module-extra packages and skip the purge/install path for existing CVM releases. Keep the old package set for pre-26.04 CVMs and gate the new 26.04 package names by UBUNTU_RELEASE.
    KERNEL_IMAGE="linux-azure-fde-lts-${UBUNTU_RELEASE}"
    KERNEL_PACKAGES=(
      "${KERNEL_IMAGE}"
    )
    MODULES_EXTRA_PKG="linux-modules-extra-azure-fde-lts-${UBUNTU_RELEASE}"

vhdbuilder/packer/pre-install-dependencies.sh:191

  • 🔴 High Risk — Backward Compatibility: this CVM branch is also used by the existing Ubuntu 24.04 CVM release job (.pipelines/.vsts-vhd-builder-release.yaml:653-661), but these renamed packages are selected for every CVM release. The checked-in 24.04 CVM image manifest shows linux-image-azure-fde-lts-24.04 installed (vhdbuilder/release-notes/AKSUbuntu/gen2/2404cvmcontainerd/latest.txt:638-642); linux-azure-fde-lts-24.04 is not the existing meta-package, so the later apt-cache show check skips kernel replacement and also uses the wrong FDE modules-extra name. Gate the new package names to Ubuntu 26.04 and retain the existing names for 24.04.
    KERNEL_IMAGE="linux-azure-fde-lts-${UBUNTU_RELEASE}"
    KERNEL_PACKAGES=(
      "${KERNEL_IMAGE}"
    )
    MODULES_EXTRA_PKG="linux-modules-extra-azure-fde-lts-${UBUNTU_RELEASE}"
  • Files reviewed: 17/17 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Existing feedback identifies backward-compatibility and release-reliability regressions in shared build paths.

Review details

Suppressed comments (11)

.pipelines/templates/.builder-release-template.yaml:99

  • 🟡 Medium Risk — 🏗️ Architecture: Removing this retry changes every Packer-based Linux VHD build, not just the new Ubuntu 26.04 CVM job. A transient Azure or Packer failure will now fail the release on its first occurrence; retain the shared retry, or scope any no-retry behavior to the one SKU that requires it.
    displayName: Build VHD

.pipelines/templates/.builder-release-template.yaml:119

  • 🟡 Medium Risk — 🏗️ Architecture: This also removes recovery from transient failures for every Image Customizer Linux build, although that path is unrelated to onboarding the Packer-based Ubuntu CVM SKU. Keep the existing retry unless this global reliability change is intentionally handled in a separate change.
    displayName: Build VHD - Image Customizer

vhdbuilder/packer/pre-install-dependencies.sh:191

  • 🔴 High Risk — Script Logic: This CVM branch runs for every Ubuntu release >= 22.04, but the new linux-azure-fde-lts-${UBUNTU_RELEASE} name is not the package used by existing CVM images. The checked-in 24.04 CVM release output contains linux-image-azure-fde-lts-24.04 (vhdbuilder/release-notes/AKSUbuntu/gen2/2404cvmcontainerd/latest.txt:639), so apt-cache show below will miss the requested package and skip the kernel purge/reinstall for 24.04 CVM builds. Preserve the pre-26.04 package names and ancillary packages for 22.04/24.04, and use this package set only for 26.04.
    KERNEL_IMAGE="linux-azure-fde-lts-${UBUNTU_RELEASE}"
    KERNEL_PACKAGES=(
      "${KERNEL_IMAGE}"
    )
    MODULES_EXTRA_PKG="linux-modules-extra-azure-fde-lts-${UBUNTU_RELEASE}"

.pipelines/templates/.builder-release-template.yaml:99

  • 🟡 Medium Risk — The PR removes the three-task retry from the VHD build step even though this change is unrelated to onboarding 26.04. Transient Azure/package-network failures will now fail every release build immediately instead of retrying, including the newly added CVM build. Please retain the existing retry setting here (and the corresponding image-customizer build step below).
    displayName: Build VHD

.pipelines/templates/.builder-release-template.yaml:119

  • 🟡 Medium Risk — The image-customizer build step also loses its existing retry count in this onboarding PR. A transient build failure will no longer be retried for image-customizer releases; restore this setting along with the VHD build step above.
    displayName: Build VHD - Image Customizer

vhdbuilder/packer/pre-install-dependencies.sh:190

  • 🔴 High Risk — This shared CVM branch now selects linux-azure-fde-lts-${UBUNTU_RELEASE} for every Ubuntu release ≥22.04. The release pipeline still builds Ubuntu 24.04 CVM (.pipelines/.vsts-vhd-builder-release.yaml:647-670), whose checked-in release notes show the available meta package is linux-image-azure-fde-lts-24.04; consequently the apt-cache show guard below will fail and the existing 24.04 VHD will silently skip its kernel purge/install. Gate the new package names to 26.04 and retain the previous package set for older CVM releases.
    KERNEL_IMAGE="linux-azure-fde-lts-${UBUNTU_RELEASE}"
    KERNEL_PACKAGES=(
      "${KERNEL_IMAGE}"
    )

.pipelines/templates/.builder-release-template.yaml:99

  • 🟡 Medium Risk — Removing this existing retry leaves transient Azure/network or package failures in the Packer build as immediate release failures, while the same template still retries publishing and cleanup tasks. Please retain retryCountOnTaskFailure: 3 here, or document and apply an equivalent reliability policy for the builder task.
    displayName: Build VHD

.pipelines/templates/.builder-release-template.yaml:119

  • 🟡 Medium Risk — This matching deletion also removes the retry from the Image Customizer build. Transient build-service or download failures will therefore fail this task immediately even though downstream publish/test tasks retain retries. Restore the retry unless this change is intentional and the builder has another retry mechanism.
    displayName: Build VHD - Image Customizer

.pipelines/templates/.builder-release-template.yaml:119

  • 🟡 Medium Risk — Operational Implications: The same retry setting was also removed from the Image Customizer build task, so transient failures in that path now fail without the template's prior three retries. Please restore retryCountOnTaskFailure: 3 here as well; this change is unrelated to the CVM feature.
    displayName: Build VHD - Image Customizer

vhdbuilder/packer/pre-install-dependencies.sh:191

  • 🔴 High Risk — Backward Compatibility: This new package name is selected for every Ubuntu CVM release, not only 26.04. The existing 24.04 CVM image BOM uses linux-image-azure-fde-lts-24.04 together with the linux-tools-azure-lts-24.04/cloud-tools/header packages (vhdbuilder/release-notes/AKSUbuntu/gen2/2404cvmcontainerd/202609.15.0.txt:634-644), so apt-cache show for linux-azure-fde-lts-24.04 will not select the kernel-replacement block later in this script. Keep the pre-26.04 CVM package set and use the renamed metapackage only for 26.04.
    KERNEL_IMAGE="linux-azure-fde-lts-${UBUNTU_RELEASE}"
    KERNEL_PACKAGES=(
      "${KERNEL_IMAGE}"
    )
    MODULES_EXTRA_PKG="linux-modules-extra-azure-fde-lts-${UBUNTU_RELEASE}"

.pipelines/templates/.builder-release-template.yaml:99

  • 🟡 Medium Risk — Operational Implications: Removing the existing retryCountOnTaskFailure: 3 makes transient Azure/Packer failures fail the release job immediately instead of retrying. This is unrelated to the Ubuntu 26.04 CVM onboarding and regresses the reliability of every Linux VHD build using this template; please restore the retry setting.
    displayName: Build VHD
  • Files reviewed: 18/18 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The VHD content test does not validate the expected Ubuntu 26.04 kernel.

Review details

Suppressed comments (4)

Previously missed (1) — in code that hasn't changed since the last review.

vhdbuilder/packer/pre-install-dependencies.sh:190

  • 🟡 Medium Risk — Test Coverage: This branch introduces the Ubuntu 26.04 CVM kernel package, but testLtsKernel in vhdbuilder/packer/test/linux-vhd-content-test.sh:803-813 leaves expected_kernel empty for 26.04. The substring check therefore always succeeds, so the VHD content test cannot detect booting an unexpected kernel. Add an explicit 26.04 expectation (the current 26.04 release notes use kernel 7.0) and cover that case in the test.

vhdbuilder/packer/pre-install-dependencies.sh:191

  • 🔴 High Risk — Script Logic / Backward Compatibility: This changes the CVM kernel branch for every Ubuntu release >=22.04 to the 26.04-only linux-azure-fde-lts-* meta package and drops the tools/cloud-tools/headers from KERNEL_PACKAGES. Existing 24.04 CVM release output contains linux-image-azure-fde-lts-24.04, linux-cloud-tools-azure-lts-24.04, and linux-tools-azure-lts-24.04 (vhdbuilder/release-notes/AKSUbuntu/gen2/2404cvmcontainerd/202609.15.0.txt:635-645), so apt-cache show will miss on 24.04 and the old CVM builds will no longer refresh/install the intended kernel package set. Keep the existing package selection for 22.04/24.04 and use the new meta-package-only selection only for 26.04.
    KERNEL_IMAGE="linux-azure-fde-lts-${UBUNTU_RELEASE}"
    KERNEL_PACKAGES=(
      "${KERNEL_IMAGE}"
    )
    MODULES_EXTRA_PKG="linux-modules-extra-azure-fde-lts-${UBUNTU_RELEASE}"

vhdbuilder/packer/pre-install-dependencies.sh:191

  • 🔴 High Risk — Script Logic / Backward Compatibility: This new package layout is selected for every CVM Ubuntu release >=22.04, not just 26.04. The release pipeline still builds the existing 24.04 CVM job, so it now probes linux-azure-fde-lts-24.04 and changes the tools/modules package set; if that layout is unavailable, the later apt-cache show branch silently skips kernel replacement, while final verification is only enabled for 26.04. Gate this layout on 26.04 and preserve the existing CVM package set for 22.04/24.04, failing when the expected kernel cannot be installed.
    KERNEL_IMAGE="linux-azure-fde-lts-${UBUNTU_RELEASE}"
    KERNEL_PACKAGES=(
      "${KERNEL_IMAGE}"
    )
    MODULES_EXTRA_PKG="linux-modules-extra-azure-fde-lts-${UBUNTU_RELEASE}"

vhdbuilder/packer/pre-install-dependencies.sh:187

  • 🔴 High Risk — Script Logic / Backward Compatibility: This CVM kernel branch is shared by the existing Ubuntu 24.04 CVM build, but changing KERNEL_IMAGE to linux-azure-fde-lts-${UBUNTU_RELEASE} makes that build probe linux-azure-fde-lts-24.04, which is not the package installed by the current 24.04 CVM image (linux-image-azure-fde-lts-24.04, as recorded in vhdbuilder/release-notes/AKSUbuntu/gen2/2404cvmcontainerd/latest.txt:639). The apt-cache show check at line 216 will therefore skip the purge/reinstall path, leaving the existing CVM build on the wrong kernel path. Gate the new 26.04 package layout on UBUNTU_RELEASE=26.04 and retain the previous CVM package set for older Ubuntu releases.
    KERNEL_IMAGE="linux-azure-fde-lts-${UBUNTU_RELEASE}"
  • Files reviewed: 17/17 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The build introduces privileged package purging and kernel replacement while lacking effective validation of the booted 26.04 FDE kernel.

Review details

Suppressed comments (2)

Previously missed (1) — in code that hasn't changed since the last review.

vhdbuilder/packer/pre-install-dependencies.sh:191

  • 🟡 Medium Risk — The content test does not validate the new Ubuntu 26.04 CVM kernel path. In testLtsKernel (vhdbuilder/packer/test/linux-vhd-content-test.sh:801-817), 26.04 leaves expected_kernel empty, so [[ "$kernel" == *"$expected_kernel"* ]] always succeeds. A VHD can therefore pass while booting the base kernel instead of the FDE kernel selected here. Add a 26.04 CVM case that verifies the running kernel is the expected FDE kernel.

vhdbuilder/packer/pre-install-dependencies.sh:191

  • 🔴 High Risk — This new package naming is applied to every CVM Ubuntu release, not only 26.04. The existing Ubuntu 24.04 CVM image inventory uses linux-image-azure-fde-lts-24.04 (and the previous branch installed that package set); with linux-azure-fde-lts-${UBUNTU_RELEASE}, the apt-cache show check later in this script misses 24.04 and skips the kernel purge/install, leaving existing CVM builds on the base kernel. Keep the old CVM package names for pre-26.04 releases and use the new names only for 26.04.
    KERNEL_IMAGE="linux-azure-fde-lts-${UBUNTU_RELEASE}"
    KERNEL_PACKAGES=(
      "${KERNEL_IMAGE}"
    )
    MODULES_EXTRA_PKG="linux-modules-extra-azure-fde-lts-${UBUNTU_RELEASE}"
  • Files reviewed: 17/17 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
github.com/Azure/agentbaker/aks-node-controller 72%
github.com/Azure/agentbaker/aks-node-controller/common 100%
github.com/Azure/agentbaker/aks-node-controller/helpers 71%
github.com/Azure/agentbaker/aks-node-controller/parser 89%
github.com/Azure/agentbaker/aks-node-controller/pkg/gpu 100%
github.com/Azure/agentbaker/aks-node-controller/pkg/nodeconfigutils 66%
github.com/Azure/agentbaker/aks-node-controller/utils 0%
github.com/Azure/agentbaker/apiserver 25%
github.com/Azure/agentbaker/cmd 0%
github.com/Azure/agentbaker/cmd/starter 0%
github.com/Azure/agentbaker/fuzz/api 0%
github.com/Azure/agentbaker/hotfix/render-nodecustomdata 0%
github.com/Azure/agentbaker/pkg/agent 76%
github.com/Azure/agentbaker/pkg/agent/datamodel 76%
github.com/Azure/agentbaker/pkg/agent/toggles 0%
github.com/Azure/agentbaker/pkg/vhdbuilder/datamodel 88%
Summary 74% (6312 / 8578)

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
staging_cse_windows Package 1 58%
debug 0%
provisioningscripts 2%
parts_windows Package 1 76%
test 0%
windows 21%
Summary 36% (1434 / 6706)

@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Health
shellspec spec 21%
Summary 21% (2864 / 13924)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Destructive package pruning and shared kernel-selection changes require human review and end-to-end CVM validation.

Review details

Suppressed comments (3)

vhdbuilder/packer/pre-install-dependencies.sh:191

  • 🔴 High Risk — Script Logic / Backward Compatibility: this CVM kernel branch now applies the Ubuntu 26.04 package names to every Ubuntu CVM build with UBUNTU_RELEASE >= 22.04. The existing 24.04 CVM pipeline still sets FEATURE_FLAGS=cvm (.pipelines/.vsts-vhd-builder-release.yaml:647-661), but its published VHD package list contains linux-image-azure-fde-lts-24.04 (vhdbuilder/release-notes/AKSUbuntu/gen2/2404cvmcontainerd/latest.txt:637-644), not linux-azure-fde-lts-24.04. Consequently apt-cache show at line 216 will not find the new name, so the old CVM kernel is not purged/reinstalled and the 24.04 build loses its kernel/tools installation path. Gate the new package set to 26.04 and retain the previous package names for 22.04/24.04.
    KERNEL_IMAGE="linux-azure-fde-lts-${UBUNTU_RELEASE}"
    KERNEL_PACKAGES=(
      "${KERNEL_IMAGE}"
    )
    MODULES_EXTRA_PKG="linux-modules-extra-azure-fde-lts-${UBUNTU_RELEASE}"

vhdbuilder/packer/pre-install-dependencies.sh:191

  • 🔴 High Risk — This changes the kernel package names for every Ubuntu CVM build, not just 26.04. The existing 24.04 CVM release notes contain linux-image-azure-fde-lts-24.04 (for example, vhdbuilder/release-notes/AKSUbuntu/gen2/2404cvmcontainerd/latest.txt:639), whereas this branch probes linux-azure-fde-lts-24.04; the later apt-cache show check will therefore skip the purge/install path for the existing build2404cvmgen2containerd job and leave its base kernel in place. Keep the pre-26.04 CVM package names and use the new FDE names only for 26.04.
    KERNEL_IMAGE="linux-azure-fde-lts-${UBUNTU_RELEASE}"
    KERNEL_PACKAGES=(
      "${KERNEL_IMAGE}"
    )
    MODULES_EXTRA_PKG="linux-modules-extra-azure-fde-lts-${UBUNTU_RELEASE}"

vhdbuilder/packer/pre-install-dependencies.sh:191

  • 🔴 High Risk — This branch is selected for every CVM Ubuntu release >= 22.04, so existing Ubuntu 24.04 CVM builds now look for linux-azure-fde-lts-24.04. That package name does not exist for Noble; the existing package is linux-image-azure-fde-lts-24.04, so the apt-cache show check later fails and the build silently skips the CVM kernel purge/install. Keep the pre-26.04 CVM package matrix and use the new package name only for 26.04.
    KERNEL_IMAGE="linux-azure-fde-lts-${UBUNTU_RELEASE}"
    KERNEL_PACKAGES=(
      "${KERNEL_IMAGE}"
    )
    MODULES_EXTRA_PKG="linux-modules-extra-azure-fde-lts-${UBUNTU_RELEASE}"
  • Files reviewed: 17/17 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

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