Skip to content

fix(verify_repository_installed): accept Azure archive for Ubuntu ARM… - #4670

Open
SrikanthMyakam (SRIKKANTH) wants to merge 1 commit into
mainfrom
smyakam/verify_repository_installed/2026_08_15
Open

fix(verify_repository_installed): accept Azure archive for Ubuntu ARM…#4670
SrikanthMyakam (SRIKKANTH) wants to merge 1 commit into
mainfrom
smyakam/verify_repository_installed/2026_08_15

Conversation

@SRIKKANTH

@SRIKKANTH SrikanthMyakam (SRIKKANTH) commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

…64 repos

verify_repository_installed hard-coded ports.ubuntu.com as the only valid repository host for every Ubuntu ARM64 image. Ubuntu 26.04 ARM64 (canonical ubuntu-26_04-lts server-arm64) serves packages from azure.archive.ubuntu.com, so the hostname check failed even though the image was healthy.

Observed on Standard_D2plds_v6 / westus2:
AssertionError: [ports.ubuntu.com, security, updates should be in
apt-get update output] Expected , but was not.

Both apt-get update runs exited 0 and the resolute-updates and resolute-security pockets were present, so only the host predicate was false. This was a stale test expectation, not an image or network failure.

Change the per-architecture map to hold a list of accepted hosts and allow Ubuntu ARM64 to match either ports.ubuntu.com or azure.archive.ubuntu.com, keeping existing ports-based ARM64 images passing. x64 behavior is unchanged. The assertion message now lists the accepted hosts.

Canonical confirmed this change about repos in 2604+ arm64 images.

Description

Related Issue

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Documentation update

Checklist

  • Description is filled in above
  • No credentials, secrets, or internal details are included
  • Peer review requested (if not, add required peer reviewers after raising PR)
  • Tests executed and results posted below

Test Validation

Key Test Cases:

  • verify_repository_installed

Impacted LISA Features:

Tested Azure Marketplace Images:

  • canonical ubuntu-24_04-lts server-arm64 latest
  • canonical 0001-com-ubuntu-server-jammy 22_04-lts-arm64 latest
  • canonical ubuntu-24_04-lts server latest
  • Canonical ubuntu-26_04-lts server-arm64 latest

Test Results

Image VM Size Result
Canonical ubuntu-26_04-lts server-arm64 latest Standard_D2plds_v6 PASSED

…64 repos

verify_repository_installed hard-coded `ports.ubuntu.com` as the only valid
repository host for every Ubuntu ARM64 image. Ubuntu 26.04 ARM64
(canonical ubuntu-26_04-lts server-arm64) serves packages from
`azure.archive.ubuntu.com`, so the hostname check failed even though the
image was healthy.

Observed on Standard_D2plds_v6 / westus2:
  AssertionError: [`ports.ubuntu.com`, `security`, `updates` should be in
  `apt-get update` output] Expected <True>, but was not.

Both `apt-get update` runs exited 0 and the resolute-updates and
resolute-security pockets were present, so only the host predicate was
false. This was a stale test expectation, not an image or network failure.

Change the per-architecture map to hold a list of accepted hosts and allow
Ubuntu ARM64 to match either `ports.ubuntu.com` or `azure.archive.ubuntu.com`,
keeping existing ports-based ARM64 images passing. x64 behavior is unchanged.
The assertion message now lists the accepted hosts.

Key Test Cases:
verify_repository_installed

Impacted LISA Features:
None

Tested Azure Marketplace Images:
- canonical ubuntu-24_04-lts server-arm64 latest
- canonical 0001-com-ubuntu-server-jammy 22_04-lts-arm64 latest
- canonical ubuntu-24_04-lts server latest

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.

Pull request overview

This PR updates the Ubuntu repository-host validation inside verify_repository_installed to accommodate newer Ubuntu ARM64 images that legitimately use azure.archive.ubuntu.com instead of only ports.ubuntu.com, preventing false-negative failures on healthy images.

Changes:

  • Switch Ubuntu repo host expectations from a single host string per-arch to a list of accepted hosts.
  • Allow Ubuntu ARM64 to match either ports.ubuntu.com or azure.archive.ubuntu.com while keeping x64 behavior unchanged.
  • Update the assertion message to reference the accepted host set.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 826 to 829
lscpu = node.tools[Lscpu]
arch = lscpu.get_architecture()
repo_url = repo_url_map.get(arch, None)
repo_urls = repo_url_map.get(arch, [])
contains_security_keyword = any(
Comment on lines 854 to 858
assert_that(
is_repository_configured_correctly,
f"`{repo_url}`, `security`, "
f"one of `{repo_urls}`, `security`, "
"`updates` should be in `apt-get "
"update` output",
@LiliDeng

Copy link
Copy Markdown
Collaborator

AI Test Case Selection

Selected 1 test case(s): verify_repository_installed

Marketplace image: debian debian-12 12-arm64 latest

Result: Succeeded

View full logs in Azure DevOps

@LiliDeng

Copy link
Copy Markdown
Collaborator

SrikanthMyakam (@SRIKKANTH) please check copilot comments

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