[Test Purpose] BMI: add bare-metal-instance platform#4569
Closed
LiliDeng wants to merge 1 commit into
Closed
Conversation
- 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
| self._wait_for_ssh(jumphost_public_ip, port=22, timeout=300) | ||
|
|
||
| client = paramiko.SSHClient() | ||
| client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) |
✅ AI Test Selection — PASSED1 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-arm64 latest
Test case details
|
Contributor
There was a problem hiding this comment.
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
bmiplatform 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 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}]") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Related Issue
Type of Change
Checklist
Test Validation
Key Test Cases:
Impacted LISA Features:
Tested Azure Marketplace Images:
Test Results