Skip to content

Retry stress-ng package install fallback#4542

Open
vyadavmsft wants to merge 1 commit into
mainfrom
vyadav_stress_ng_install_fallback
Open

Retry stress-ng package install fallback#4542
vyadavmsft wants to merge 1 commit into
mainfrom
vyadav_stress_ng_install_fallback

Conversation

@vyadavmsft

Copy link
Copy Markdown
Collaborator

Refresh Debian apt metadata once when apt-cache policy reports that a package has no candidate or cannot be located. This keeps the existing first-time package initialization path intact while covering transient metadata visibility issues before callers fall back to source builds.

For stress-ng, keep repo-not-found failures visible, but fall back to the source build path when the package manager reports a LISA package-install failure and the binary is still unavailable. This covers apt dependency-resolution failures such as held broken packages while preserving the existing AppArmor source-build dependency fix already on main.

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:

Impacted LISA Features:

Tested Azure Marketplace Images:

Test Results

Image VM Size Result
PASSED / FAILED / SKIPPED

Copilot AI review requested due to automatic review settings June 18, 2026 18:36

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 improves resilience of package-based installation on Debian-family distros by retrying apt metadata refresh once when apt-cache policy indicates a package is unavailable, and it adjusts stress-ng installation to fall back to a source build when package-manager installation fails but the binary is still missing.

Changes:

  • Add a one-time apt metadata refresh + retry to Debian’s is_package_in_repo path when apt-cache policy reports “Candidate: (none)” / “Unable to locate package”.
  • Update StressNg.install() to treat repo-not-found as fatal, but otherwise allow fallback to source build when package install fails and stress-ng is still unavailable.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
lisa/tools/stress_ng.py Adds package-install error handling and a “binary still missing → source build” fallback path for stress-ng.
lisa/operating_system.py Adds one-time apt metadata refresh retry when apt-cache policy indicates a package has no candidate/can’t be located.

Comment thread lisa/tools/stress_ng.py Outdated
Comment thread lisa/operating_system.py
Refresh Debian apt metadata once when apt-cache policy reports that a package has no candidate or cannot be located. This keeps the existing first-time package initialization path intact while covering transient metadata visibility issues before callers fall back to source builds.

For stress-ng, keep repo-not-found failures visible, but fall back to the source build path when the package manager reports a LISA package-install failure and the binary is still unavailable. This covers apt dependency-resolution failures such as held broken packages while preserving the existing AppArmor source-build dependency fix already on main.
@vyadavmsft vyadavmsft force-pushed the vyadav_stress_ng_install_fallback branch from c86d502 to bf92969 Compare June 18, 2026 18:42
@github-actions

Copy link
Copy Markdown

⏭️ AI Test Selection — SKIPPED

1 test case(s) selected (view run)

Marketplace image: microsoftcblmariner azure-linux-3 azure-linux-3 latest

Selected test cases
verify_dynamic_memory_hot_add

@github-actions

Copy link
Copy Markdown

✅ AI Test Selection — PASSED

2 test case(s) selected (view run)

Marketplace image: microsoftcblmariner azure-linux-3 azure-linux-3 latest

Count
✅ Passed 0
❌ Failed 0
⏭️ Skipped 2
Total 2
Test case details
Test Case Status Time (s) Message
verify_dynamic_memory_hot_add (lisa_0_1) ⏭️ SKIPPED 0.000 requires [azure] but VM supports [hyperv]
verify_hibernation_with_memory_workload (lisa_0_0) ⏭️ SKIPPED 12.813 skipped: hibernation setup tool doesn't support current distro CBLMariner, version 3.0.0

@vyadavmsft

Copy link
Copy Markdown
Collaborator Author

@LiliDeng check this pls

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.

2 participants