Skip to content

Fix verify_sriov_ethtool_offload_setting timing out on MANA-based Azure VMs - #4672

Open
Sebastian Heid (s4heid) wants to merge 1 commit into
microsoft:mainfrom
s4heid:sriov-device-discovery
Open

Fix verify_sriov_ethtool_offload_setting timing out on MANA-based Azure VMs#4672
Sebastian Heid (s4heid) wants to merge 1 commit into
microsoft:mainfrom
s4heid:sriov-device-discovery

Conversation

@s4heid

Copy link
Copy Markdown
Contributor

Description

Ethtool.get_device_list() previously searched recursively through /sys/devices. This traverses the complete dynamic device hierarchy and can block before returning the discovered interfaces. The implementation now enumerates the flat /sys/class/net interface registry and resolves each interface's driver symlink, selecting only hv_netvsc devices.

The test also previously changed Azure Accelerated Networking on a running VM to trigger VF removal. The control-plane setting can change without causing a live VF revocation. The test now uses PCI remove/rescan, directly exercising the guest VF removal, NetVSC fallback, MANA reprobe, and offload-setting recovery paths.

Related Issue

N/A

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_sriov_ethtool_offload_setting

Impacted LISA Features:
NetworkInterface

Tested Azure Marketplace Images:

  • canonical ubuntu-24_04-lts server latest

Test Results

Image VM Size Result
canonical ubuntu-24_04-lts server 24.04.202608070 Standard_D2ds_v7 PASSED
Ubuntu 24.04 BOSH Linux stemcell Standard_D2ds_v7 PASSED
Ubuntu 24.04 BOSH Linux stemcell Standard_D8as_v5 PASSED

Enumerate synthetic NICs through /sys/class/net instead of recursively
traversing /sys/devices, which can block on dynamic sysfs state.

Use PCI remove/rescan for VF recovery instead of changing Azure
Accelerated Networking on a running VM.

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 addresses timeouts and reliability issues in the SR-IOV offload-setting test on MANA-based Azure VMs by speeding up NIC discovery in Ethtool and shifting the test’s VF removal trigger from control-plane SR-IOV toggling to guest-side PCI remove/rescan.

Changes:

  • Updated Ethtool.get_device_list() to enumerate /sys/class/net and identify hv_netvsc devices via the driver symlink, avoiding recursive traversal under /sys/devices.
  • Updated the SR-IOV offload-setting test to use PCI device remove/rescan (via disable_enable_devices) instead of toggling SR-IOV in Azure control-plane.

Reviewed changes

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

File Description
lisa/tools/ethtool.py Speeds up NIC discovery by switching to /sys/class/net enumeration and driver-symlink resolution.
lisa/microsoft/testsuites/network/sriov.py Adjusts test steps and execution to trigger VF removal/re-add via PCI sysfs rather than SR-IOV toggle.

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

Comment thread lisa/microsoft/testsuites/network/sriov.py
Comment on lines +653 to +654
# Rescind and re-add the VFs through PCI sysfs
disable_enable_devices(environment)
@LiliDeng

Copy link
Copy Markdown
Collaborator

Sebastian Heid (@s4heid) is it a potential issue when seeing timeout on mana based azure vms?

@s4heid

Copy link
Copy Markdown
Contributor Author

The timeout occurred on MANA-based VMs, but the serial console logs did not indicate a MANA driver defect (no MANA timeout, panic, hung task, or failed remove callback). The same D2ds_v7 MANA configuration passes after changing only the LISA discovery and recovery paths.

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