Skip to content

Add MANA driver-presence test suite and runbook (ICM 809802825) - #4673

Open
vtahiliani wants to merge 1 commit into
microsoft:mainfrom
vtahiliani:dev/vtahiliani/manatest
Open

Add MANA driver-presence test suite and runbook (ICM 809802825)#4673
vtahiliani wants to merge 1 commit into
microsoft:mainfrom
vtahiliani:dev/vtahiliani/manatest

Conversation

@vtahiliani

Copy link
Copy Markdown
Collaborator

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-mshv build shipped without CONFIG_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 synthetic hv_netvsc networking — while platform monitoring still reported the VM healthy (AccelNet effectively unavailable).

Changes

  • lisa/microsoft/testsuites/network/mana.py — new Mana suite:
    • verify_mana_driver_present (Linux): when a MANA VF is present, asserts CONFIG_MICROSOFT_MANA is enabled, the mana module 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 reports Status = OK (driver bound, not orphaned).
    • Both self-skip on VMs where the platform does not expose a MANA VF.
  • lisa/microsoft/runbook/mana.yml — selects area:mana and 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

  • flake8 / black / isort: pass
  • Suite registers with both cases; runbook YAML parses

Test suggestion

Key Test Cases: verify_mana_driver_present|verify_mana_driver_present_windows
Impacted LISA Features: Sriov, NetworkInterface
Tested Azure Marketplace Images:

  • microsoftcblmariner azure-linux-3 azure-linux-3-gen2 latest
  • microsoftcblmariner azure-linux-3 azure-linux-3 latest

Related: ICM 809802825

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
Copilot AI lite review requested due to automatic review settings August 14, 2026 14:12

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

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 mana test suite with Linux and Windows cases to verify MANA VF presence and driver binding.
  • Adds a mana.yml runbook selecting area: mana and 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=False for the Get-PnpDevice query. If the cmdlet fails (missing module, transient PS error, etc.), run_cmdlet can 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.

Comment on lines +80 to +96
# 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()
@LiliDeng

Copy link
Copy Markdown
Collaborator

Please avoid including internal ICM IDs here since this is a public code repository.

@@ -0,0 +1,88 @@
name: mana

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need this file

@LiliDeng

LiliDeng commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

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.

Johnson (@johnsongeorge-w) FYI.

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