Skip to content

fix: Add _initialize_package_installation for Fedora#4474

Merged
LiliDeng merged 2 commits into
microsoft:mainfrom
balakreddy:fedora_initialize_package_installation
May 19, 2026
Merged

fix: Add _initialize_package_installation for Fedora#4474
LiliDeng merged 2 commits into
microsoft:mainfrom
balakreddy:fedora_initialize_package_installation

Conversation

@balakreddy
Copy link
Copy Markdown
Contributor

Description

Add _initialize_package_installation() override in the Fedora class to refresh DNF metadata cache before the first package installation. On freshly provisioned Fedora VMs, package installations can fail due to stale DNF metadata. Seen intermittent failures during daily runs for Fedora Rawhide.

This mirrors the existing pattern in the Debian class which runs apt-get update before first package install.

Changes

  • Run dnf clean metadata to remove stale cache
  • Run dnf makecache to download fresh repository metadata
  • Retry up to 5 times with 5s delay for transient network failures

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_network_interface_reload_via_ip_link

Impacted LISA Features:
NetworkInterface

Tested Azure Marketplace Images:

  • Fedora-Cloud-Rawhide-Arm64 (community gallery)

Test Results

Image VM Size Result
Fedora-Cloud-Rawhide-Arm64 Standard_D2ps_v5 PASSED

- Clean and refresh dnf metadata cache before first package install
- Prevents stale metadata failures on fresh VMs

Signed-off-by: Bala Konda Reddy M <bala12352@gmail.com>
Copilot AI review requested due to automatic review settings May 11, 2026 23:30
Copy link
Copy Markdown
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 adds a Fedora-specific _initialize_package_installation() hook to refresh DNF metadata before the first package installation, aiming to reduce intermittent package install failures on freshly provisioned Fedora (e.g., Rawhide) nodes.

Changes:

  • Add Fedora override of _initialize_package_installation() to run dnf clean metadata and dnf makecache before first package operation.
  • Add retry behavior around the initialization to tolerate transient failures.

Comment thread lisa/operating_system.py Outdated
Comment thread lisa/operating_system.py Outdated
Signed-off-by: Bala Konda Reddy M <bala12352@gmail.com>
Copy link
Copy Markdown
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

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

Comment thread lisa/operating_system.py
Comment thread lisa/operating_system.py
@LiliDeng LiliDeng merged commit 196722e into microsoft:main May 19, 2026
33 of 34 checks passed
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