Skip to content

fix: pin Ubuntu 22.04 LTS kernel to 5.15.0-1102-azure#7972

Merged
awesomenix merged 1 commit intomainfrom
fix/pin-ubuntu2204-kernel-1102
Feb 27, 2026
Merged

fix: pin Ubuntu 22.04 LTS kernel to 5.15.0-1102-azure#7972
awesomenix merged 1 commit intomainfrom
fix/pin-ubuntu2204-kernel-1102

Conversation

@awesomenix
Copy link
Contributor

@awesomenix awesomenix commented Feb 26, 2026

Problem

Kernel 5.15.0-1103-azure has a regression on Ubuntu 22.04.

Fix

Pin VHD build to install 5.15.0-1102-azure instead of the latest meta-package.

What changed

  • Added an elif branch for Ubuntu 22.04 in pre-install-dependencies.sh that installs version-pinned packages instead of meta-packages (linux-image-azure-lts-22.04)
  • 24.04+ and CVM paths are unaffected

Pinned packages (all 5 match the original meta-package set)

Meta-package (before) Pinned package (after)
linux-image-azure-lts-22.04 linux-image-5.15.0-1102-azure
linux-tools-azure-lts-22.04 linux-tools-5.15.0-1102-azure
linux-cloud-tools-azure-lts-22.04 linux-cloud-tools-5.15.0-1102-azure
linux-headers-azure-lts-22.04 linux-headers-5.15.0-1102-azure
linux-modules-extra-azure-lts-22.04 linux-modules-extra-5.15.0-1102-azure

Remaining packages (linux-modules-5.15.0-1102-azure, linux-azure-headers-5.15.0-1102, linux-azure-tools-5.15.0-1102, linux-azure-cloud-tools-5.15.0-1102, wireless-regdb) are transitive dependencies pulled in automatically by apt.

How it works

  1. apt_get_dist_upgrade (line 106) transiently installs 1103 — this is expected and harmless
  2. The kernel block (line 164-167) purges all linux-*azure* packages including 1103
  3. Then installs the pinned 1102 packages (line 171)
  4. The VHD ends up with only 5.15.0-1102-azure

No impact on other paths

  • CVM: Uses linux-image-azure-fde-lts-* (different kernel flavor), unaffected
  • Ubuntu 24.04+: Falls through to the else branch, still uses meta-packages
  • FIPS: Entire block is skipped when ENABLE_FIPS=true
  • CSE/provisioning: cse_install_ubuntu.sh uses uname -r at runtime for headers, works with any kernel version on the VHD
  • VHD content test: Only checks 5.15 prefix (not specific patch), so passes with 1102

Revert

When the upstream regression is fixed, remove the elif block to resume tracking latest.

   Kernel 5.15.0-1103-azure has a regression on Ubuntu 22.04. This change
   pins the VHD build to install 5.15.0-1102-azure instead.

   The existing else branch installed meta-packages (linux-image-azure-lts-22.04)
   which always resolve to the latest kernel. A new elif for Ubuntu 22.04
   installs version-pinned packages (linux-image-5.15.0-1102-azure, etc.)
   while 24.04+ continues using meta-packages.

   The dist-upgrade step still transiently installs 1103, but the kernel
   block purges all kernel packages and reinstalls the pinned 1102 version.
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

This PR addresses a kernel regression in Ubuntu 22.04 by pinning the VHD build to kernel version 5.15.0-1102-azure instead of tracking the latest meta-package (which would install 5.15.0-1103-azure). The PR also includes unrelated test configuration changes for MA35D GPU tests.

Changes:

  • Pinned Ubuntu 22.04 non-CVM, non-FIPS VHD builds to kernel 5.15.0-1102-azure to avoid a regression in 5.15.0-1103-azure
  • Modified MA35D e2e tests to use CacheDisk placement instead of the default ResourceDisk placement

Reviewed changes

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

File Description
vhdbuilder/packer/pre-install-dependencies.sh Added conditional branch to install pinned kernel version 5.15.0-1102-azure for Ubuntu 22.04 instead of latest LTS meta-package
e2e/scenario_test.go Modified MA35D test configurations to use CacheDisk placement and adjusted formatting of Location field

Comment on lines +139 to +149
elif [ "${UBUNTU_RELEASE}" = "22.04" ]; then
# Pin to 5.15.0-1102-azure to avoid regression in 5.15.0-1103-azure
KERNEL_IMAGE="linux-image-5.15.0-1102-azure"
KERNEL_PACKAGES=(
"linux-image-5.15.0-1102-azure"
"linux-tools-5.15.0-1102-azure"
"linux-cloud-tools-5.15.0-1102-azure"
"linux-headers-5.15.0-1102-azure"
"linux-modules-extra-5.15.0-1102-azure"
)
echo "Installing pinned LTS kernel 5.15.0-1102-azure for Ubuntu 22.04 (regression in 1103)"
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

The Ubuntu 22.04 kernel pin affects all non-CVM, non-FIPS Ubuntu 22.04 VHD builds but lacks corresponding e2e test coverage. Since this is a temporary workaround for a kernel regression that could cause node failures in production, there should be at least one Ubuntu 22.04 e2e test that validates the kernel version is actually 5.15.0-1102-azure.

Consider adding a validator that checks the output of 'uname -r' to verify the pinned kernel is installed. This is especially important since the PR description notes this will be reverted once the upstream regression is fixed, and having test coverage will make it obvious when the pin can be safely removed.

Copilot uses AI. Check for mistakes.
@awesomenix awesomenix merged commit bdcd087 into main Feb 27, 2026
29 of 30 checks passed
@awesomenix awesomenix deleted the fix/pin-ubuntu2204-kernel-1102 branch February 27, 2026 01:32
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