Fix verify_sriov_ethtool_offload_setting timing out on MANA-based Azure VMs - #4672
Fix verify_sriov_ethtool_offload_setting timing out on MANA-based Azure VMs#4672Sebastian Heid (s4heid) wants to merge 1 commit into
Conversation
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.
There was a problem hiding this comment.
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/netand identifyhv_netvscdevices 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.
| # Rescind and re-add the VFs through PCI sysfs | ||
| disable_enable_devices(environment) |
|
Sebastian Heid (@s4heid) is it a potential issue when seeing timeout on mana based azure vms? |
|
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. |
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/netinterface registry and resolves each interface's driver symlink, selecting onlyhv_netvscdevices.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
Checklist
Test Validation
Key Test Cases:
verify_sriov_ethtool_offload_setting
Impacted LISA Features:
NetworkInterface
Tested Azure Marketplace Images:
Test Results
canonical ubuntu-24_04-lts server 24.04.202608070