Repository navigation
Refactor Cloud Hypervisor startup into network, staging, and launch stages - #11905
Conversation
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
The asynchronous VMM stage extraction spans privileged network ownership, temporary device ACLs, and partial-start cleanup, requiring human review of cross-stage failure and teardown ordering.
No open issues 🎉
What changed in this PR
Refactors AWF’s Cloud Hypervisor startup into explicit network, staging, and launch stages, making resource ownership and partial-start cleanup easier to follow.
Changes:
- Extracts network setup, artifact staging, and confined VMM launch into dedicated modules.
- Keeps the public startup signature, shared check wrapper, error reporting, and cleanup in the orchestrator.
- Adds regression coverage for startup ordering, early failures, reservation release, and device-access revocation.
| File | Description |
|---|---|
src/cloud-hypervisor/manager-start.ts |
Coordinates the extracted stages and retains startup-error handling. |
src/cloud-hypervisor/manager-start-stage.ts |
Prepares rootfs, run directory, cgroup, artifacts, and ownership checks. |
src/cloud-hypervisor/manager-start-network.ts |
Handles topology resolution, network reservation, setup, and release errors. |
src/cloud-hypervisor/manager-start-launch.ts |
Handles device access, VMM launch, confinement, virtiofsd, and VM creation. |
src/cloud-hypervisor/manager-launch.test.ts |
Checks stage ordering and device-access revocation before cleanup. |
src/cloud-hypervisor/manager-launch-evidence.test.ts |
Extends original-failure attribution coverage to earlier startup stages. |
src/cloud-hypervisor/manager-cleanup.test.ts |
Covers reservation release when cleanup-record capture fails. |
Review effort: Max (adaptive)
|
✅ Copilot review passed with no inline comments. @lpcox Add the |
|
@copilot merge main, resolve conflicts, and address review feedback |
…t-startcloudhypervisor Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Merged |
startCloudHypervisormixed network allocation, artifact staging, and VMM launch in one deeply nested function, obscuring partial-start resource ownership.checkwrapper.