fix(verify_repository_installed): accept Azure archive for Ubuntu ARM… - #4670
Open
SrikanthMyakam (SRIKKANTH) wants to merge 1 commit into
Open
fix(verify_repository_installed): accept Azure archive for Ubuntu ARM…#4670SrikanthMyakam (SRIKKANTH) wants to merge 1 commit into
SrikanthMyakam (SRIKKANTH) wants to merge 1 commit into
Conversation
…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
SrikanthMyakam (SRIKKANTH)
requested a review
from Johnson (johnsongeorge-w)
as a code owner
August 14, 2026 08:40
Copilot started reviewing on behalf of
SrikanthMyakam (SRIKKANTH)
August 14, 2026 08:41
View session
Contributor
There was a problem hiding this comment.
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.comorazure.archive.ubuntu.comwhile 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", |
Collaborator
AI Test Case SelectionSelected 1 test case(s): verify_repository_installed Marketplace image: Result: Succeeded |
Collaborator
|
SrikanthMyakam (@SRIKKANTH) please check copilot comments |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…64 repos
verify_repository_installed hard-coded
ports.ubuntu.comas the only valid repository host for every Ubuntu ARM64 image. Ubuntu 26.04 ARM64 (canonical ubuntu-26_04-lts server-arm64) serves packages fromazure.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,updatesshould be inapt-get updateoutput] Expected , but was not.Both
apt-get updateruns 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.comorazure.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
Checklist
Test Validation
Key Test Cases:
Impacted LISA Features:
Tested Azure Marketplace Images:
Test Results