Apply guest requirements to guest environments#4464
Conversation
✅ AI Test Selection — PASSED1 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
Test case details
|
There was a problem hiding this comment.
Pull request overview
This PR updates guest-enabled environment selection in the LISA runner so parent hosts are derived from the platform/orchestrator requirement instead of inheriting testcase environment sizing, while preserving the testcase requirement for guest-side validation.
Changes:
- Split the platform/test requirement merge logic into helpers and route guest-enabled runs through a new parent-requirement builder.
- Initialize the deploy task’s primary
test_resultbefore the nestedtryblocks. - Add a selftest covering guest-enabled requirement merging with a platform-defined parent requirement.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
lisa/runners/lisa_runner.py |
Refactors requirement merging and changes guest-enabled parent environment construction. |
selftests/runners/test_lisa_runner.py |
Adds a regression test for guest-enabled requirement merging. |
|
@copilot apply changes based on the comments in this thread |
|
@copilot can you run more test. |
Done in commit 16357d9. Both issues from the review are addressed:
|
... Ran 127 tests across all relevant selftests modules — all pass:
The pre-existing failures in the full |
✅ AI Test Selection — PASSED1 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
Test case details
|
✅ AI Test Selection — PASSED1 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
Test case details
|
When guest_enabled is set, build the parent environment requirement from the platform/runbook requirement instead of copying the testcase environment requirement. This keeps testcase min_count, OS, and feature constraints on the guest environment path while Azure/OpenVMM parent hosts are sized by the orchestrator configuration. The existing platform/test requirement merge remains unchanged for non-guest runs and is factored into a helper. The deploy task also initializes its test result before cleanup so static analysis can prove it is always bound. Add a runner regression test that verifies guest-enabled runs create a one-node parent environment from the platform requirement while preserving the two-node testcase requirement for guests.
Allow a single platform guest runbook entry to request multiple guest nodes through capability.node_count. During platform runbook loading, LISA now expands that guest template into concrete guest runbooks and normalizes each expanded guest capability back to node_count 1 while preserving the requested core_count, memory_mb, and other guest settings. This lets OpenVMM create g0..gN from one YAML template. The existing per-guest network derivation then produces unique TAP names and forwarded SSH ports, for example tap0/60022 through tap3/60025 for a four-node template. Also treat a non-zero forwarded_port as shorthand for enabling SSH forwarding, so TAP guest runbooks can specify the base forwarded port without repeating forward_ssh_port.
✅ AI Test Selection — PASSED1 test case(s) selected (view run) Marketplace image: canonical 0001-com-ubuntu-server-jammy 22_04-lts-gen2 latest
Test case details
|
Description
When guest_enabled is set, build the parent environment requirement from the platform/runbook requirement instead of copying the testcase environment requirement. This keeps testcase min_count, OS, and feature constraints on the guest environment path while Azure/OpenVMM parent hosts are sized by the orchestrator configuration.
The existing platform/test requirement merge remains unchanged for non-guest runs and is factored into a helper. The deploy task also initializes its test result before cleanup so static analysis can prove it is always bound.
Add a runner regression test that verifies guest-enabled runs create a one-node parent environment from the platform requirement while preserving the two-node testcase requirement for guests.
Related Issue
Type of Change
Checklist
Test Validation
Key Test Cases:
Impacted LISA Features:
Tested Azure Marketplace Images:
Test Results