Skip to content

[Test Purpose] BMI: add bare-metal-instance platform#4569

Closed
LiliDeng wants to merge 1 commit into
mainfrom
feature/bmi-platform_180526_133753
Closed

[Test Purpose] BMI: add bare-metal-instance platform#4569
LiliDeng wants to merge 1 commit into
mainfrom
feature/bmi-platform_180526_133753

Conversation

@LiliDeng

Copy link
Copy Markdown
Collaborator
  • New sut_orchestrator/bmi platform (deployer, hooks, schema, bicep, ARM template)
  • Derive capability from Azure resourceSkus for bmi_vm_size; drive fleet size from nodes_requirement (no hardcoded fallback)
  • bmi_update_arm_template hook for NSG enablement extensions; drop static NSG sourceAddressPrefixes plumbing (rules injected via hook)
  • Self-heal NSG when agent SNAT egress IP rotates mid-run; trigger from SshShell connect failures; dual probe sshd (internal + external via jumphost) and ARP-flush self-heal
  • Probe SSH banner and extend ready_timeout for slow BMI boot
  • nsg_source_address_prefixes as comma-separated string for CLI compat
  • smoke_test/reboot: extend reboot wait timeouts for slow-boot platforms (GB200 metal): smoke 1200s->2400s, reboot default 1800s, probe BMI:22 via jumphost ssh on reconnect failure
  • ntttcp: bump setup_system reboot timeout 600s->1800s for bare metal

Description

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:

Impacted LISA Features:

Tested Azure Marketplace Images:

Test Results

Image VM Size Result
PASSED / FAILED / SKIPPED

- New sut_orchestrator/bmi platform (deployer, hooks, schema, bicep, ARM template)
- Derive capability from Azure resourceSkus for bmi_vm_size; drive fleet size
  from nodes_requirement (no hardcoded fallback)
- bmi_update_arm_template hook for NSG enablement extensions; drop static
  NSG sourceAddressPrefixes plumbing (rules injected via hook)
- Self-heal NSG when agent SNAT egress IP rotates mid-run; trigger from
  SshShell connect failures; dual probe sshd (internal + external via
  jumphost) and ARP-flush self-heal
- Probe SSH banner and extend ready_timeout for slow BMI boot
- nsg_source_address_prefixes as comma-separated string for CLI compat
- smoke_test/reboot: extend reboot wait timeouts for slow-boot platforms
  (GB200 metal): smoke 1200s->2400s, reboot default 1800s, probe BMI:22
  via jumphost ssh on reconnect failure
- ntttcp: bump setup_system reboot timeout 600s->1800s for bare metal
Copilot AI review requested due to automatic review settings June 30, 2026 06:18
self._wait_for_ssh(jumphost_public_ip, port=22, timeout=300)

client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
@github-actions

Copy link
Copy Markdown

✅ AI Test Selection — PASSED

1 test case(s) selected (view run)

Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-arm64 latest

Count
✅ Passed 1
❌ Failed 0
⏭️ Skipped 0
Total 1
Test case details
Test Case Status Time (s) Message
smoke_test (lisa_0_0) ✅ PASSED 25.383

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 introduces a new BMI (Bare-Metal Instance) Azure SUT orchestrator platform for LISA, including runbook schema, deployment orchestration via an ARM template artifact generated from Bicep, and environment exposure through a jumphost NAT model. It also includes related reliability improvements for NIC discovery on hosts where the default route points to a virtual “master” device.

Changes:

  • Add a new bmi platform implementation (schema, deployer, hookspecs, and ARM/Bicep template artifacts) and register it in the orchestrator/module import flow.
  • Add reusable Azure credential construction helper to share AzurePlatform’s auth resolution across Azure-based platforms.
  • Improve NIC enumeration/default NIC selection to avoid virtual master devices (VRF/bridge/bond) and resolve to an enslaved physical NIC.

Reviewed changes

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

Show a summary per file
File Description
lisa/util/constants.py Adds PLATFORM_BMI constant for platform registration.
lisa/sut_orchestrator/bmi/schema.py Defines BMI runbook schema and node context → RemoteNode conversion.
lisa/sut_orchestrator/bmi/platform_.py Implements BMI platform lifecycle: sizing fleet from requirements, capability matching, node materialization, and NSG self-heal wiring attempt.
lisa/sut_orchestrator/bmi/hooks.py Adds pluggy hookspecs for template mutation and NSG refresh extensions.
lisa/sut_orchestrator/bmi/deployer.py Implements ARM deployment, resource discovery, jumphost NAT configuration, and readiness probing.
lisa/sut_orchestrator/bmi/bmi.bicep Source-of-truth Bicep for BMI environment topology (host group, jumphost, BMIs).
lisa/sut_orchestrator/bmi/autogen_bmi_template.json Generated ARM template artifact consumed by the deployer at runtime.
lisa/sut_orchestrator/bmi/init.py Ensures BMI hookspecs are registered on package import.
lisa/sut_orchestrator/azure/credential.py Adds build_compute_credential() helper to unify Azure auth resolution.
lisa/sut_orchestrator/init.py Exposes BMI type constant alongside other platforms.
lisa/nic.py Skips virtual master devices during NIC load and resolves default route NIC to a real physical NIC.
lisa/mixin_modules.py Registers BMI platform for reflection-based loading (optional import).
examples/runbook/bmi.yml Adds an example BMI runbook for smoke/provisioning validation.

Comment on lines +263 to +267
shell = getattr(node, "_shell", None)
if shell is not None:
shell._pre_connect_failure_hook = node._bmi_diag[
"nsg_refresh"
] # type: ignore[attr-defined]
Comment on lines +268 to +269
except Exception:
pass
Comment on lines +276 to +277
Returns ``None`` when the SKU is not found or the lookup fails — the
caller is expected to fall back to a generic capability.
Comment on lines +531 to +539
# Decompose the Canonical-style URN into the four image fields. The
# URN is "publisher:offer:sku:version".
urn_parts = self._runbook.jumphost_image.split(":")
if len(urn_parts) == 4:
params["jumphostImagePublisher"] = {"value": urn_parts[0]}
params["jumphostImageOffer"] = {"value": urn_parts[1]}
params["jumphostImageSku"] = {"value": urn_parts[2]}
params["jumphostImageVersion"] = {"value": urn_parts[3]}
return params
Comment thread lisa/mixin_modules.py
Comment on lines +26 to +29
try:
import lisa.sut_orchestrator.bmi.platform_ # noqa: F401
except ModuleNotFoundError as e:
print(f"bmi package is not installed. [{e}]")
@LiliDeng LiliDeng closed this Jun 30, 2026
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