Add MANA driver-presence test suite and runbook (ICM 809802825) - #4673
Add MANA driver-presence test suite and runbook (ICM 809802825)#4673vtahiliani wants to merge 1 commit into
Conversation
Add a dedicated MANA (Microsoft Azure Network Adapter) test suite
(area="mana") with Linux and Windows cases that verify the MANA driver is
present and bound when the platform exposes a MANA VF (1414:00ba), so
AccelNet/SR-IOV is actually available instead of silently falling back to
the synthetic datapath.
This closes the gap from ICM 809802825, where an AzureLinux 3.0 kernel-mshv
build shipped without CONFIG_MICROSOFT_MANA and the MANA VF was orphaned on
the PCI bus while platform monitoring still reported the VM healthy.
- lisa/microsoft/testsuites/network/mana.py:
- verify_mana_driver_present (Linux): asserts CONFIG_MICROSOFT_MANA
enabled, mana module loaded, and VF paired with a synthetic NIC.
- verify_mana_driver_present_windows (Windows): asserts the MANA VF PnP
device (VEN_1414&DEV_00BA) is present and reports Status OK.
- lisa/microsoft/runbook/mana.yml: selects area:mana and defaults to a
MANA-capable VM size.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c47c05b5-9764-4ff7-8a9b-bc5f251136d2
There was a problem hiding this comment.
Pull request overview
Adds a dedicated LISA test suite and runbook to detect regressions where a MANA VF is exposed but the guest lacks a bound MANA driver (leading to silent fallback to synthetic networking), addressing the gap described in ICM 809802825.
Changes:
- Introduces a new
manatest suite with Linux and Windows cases to verify MANA VF presence and driver binding. - Adds a
mana.ymlrunbook selectingarea: manaand a MANA-capable default VM size for validation runs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| lisa/microsoft/testsuites/network/mana.py | New MANA driver-presence test suite for Linux/Windows. |
| lisa/microsoft/runbook/mana.yml | New runbook to execute the mana area on Azure with a default MANA-capable SKU. |
Suppressed comments (1)
lisa/microsoft/testsuites/network/mana.py:130
- The Windows case sets
fail_on_error=Falsefor theGet-PnpDevicequery. If the cmdlet fails (missing module, transient PS error, etc.),run_cmdletcan return empty output and the test will incorrectly self-skip as if no MANA VF is present. Let the cmdlet failure surface as a real test failure and only skip when the query succeeds but returns no matching devices.
devices = powershell.run_cmdlet(
"Get-PnpDevice -PresentOnly | "
"Where-Object { $_.InstanceId -match 'VEN_1414&DEV_00BA' } | "
"Select-Object Status, Class, FriendlyName, InstanceId",
output_json=True,
fail_on_error=False,
)
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| # The mana module must actually be loaded, i.e. the VF is bound and not | ||
| # sitting orphaned on the PCI bus. | ||
| assert_that( | ||
| node.tools[Lsmod].module_exists("mana", force_run=True) | ||
| ).described_as( | ||
| "CONFIG_MICROSOFT_MANA is enabled but the 'mana' module is not " | ||
| "loaded; the MANA VF is not bound and the VM is running on " | ||
| "synthetic networking only." | ||
| ).is_true() | ||
|
|
||
| # The MANA VF must be paired with a synthetic NIC so the accelerated | ||
| # datapath is in use rather than hv_netvsc alone. | ||
| paired_vf_nics = [nic for nic in node.nics.nics.values() if nic.lower] | ||
| assert_that(paired_vf_nics).described_as( | ||
| "No synthetic NIC is paired with a MANA VF; the accelerated " | ||
| "datapath is not established and traffic falls back to hv_netvsc." | ||
| ).is_not_empty() |
|
Please avoid including internal ICM IDs here since this is a public code repository. |
| @@ -0,0 +1,88 @@ | |||
| name: mana | |||
|
vtahiliani Since we already collect whether the MANA driver is enabled in the information, we can leverage that information for this validation. If we add this as a standalone test case, many existing/older images without the MANA driver enabled would fail, even though that is expected for those images. It may be better to use the existing information to determine whether the validation is applicable, rather than making the case fail for images that don't support MANA. |
Summary
Adds a dedicated MANA (Microsoft Azure Network Adapter) test suite (
area="mana") plus a runbook, to close the coverage gap identified for ICM 809802825.In that incident, an AzureLinux 3.0
kernel-mshvbuild shipped withoutCONFIG_MICROSOFT_MANA. When the platform attached a MANA VF (1414:00ba), no driver bound it, the VF sat orphaned on the PCI bus, and the VM silently fell back to synthetichv_netvscnetworking — while platform monitoring still reported the VM healthy (AccelNet effectively unavailable).Changes
lisa/microsoft/testsuites/network/mana.py— newManasuite:verify_mana_driver_present(Linux): when a MANA VF is present, assertsCONFIG_MICROSOFT_MANAis enabled, themanamodule is loaded, and the VF is paired with a synthetic NIC.verify_mana_driver_present_windows(Windows): asserts the MANA VF PnP device (VEN_1414&DEV_00BA) is present and reportsStatus = OK(driver bound, not orphaned).lisa/microsoft/runbook/mana.yml— selectsarea:manaand defaults to a MANA-capable VM size (Standard_D8s_v6).How to run
lisa -r ./lisa/microsoft/runbook/mana.yml -v subscription_id:<sub> -v admin_private_key_file:<key> -v "marketplace_image:microsoftcblmariner azure-linux-3 azure-linux-3-gen2 latest"Validation
Test suggestion
Key Test Cases:
verify_mana_driver_present|verify_mana_driver_present_windowsImpacted LISA Features: Sriov, NetworkInterface
Tested Azure Marketplace Images:
microsoftcblmariner azure-linux-3 azure-linux-3-gen2 latestmicrosoftcblmariner azure-linux-3 azure-linux-3 latestRelated: ICM 809802825