Skip to content

runtime adapter: template and clone operations #847

Closed

Description

Parent: #834 (#833), step 5. Needs: #846, and #805's PR 3 (executions in the test adapter's VMs). Unblocks: stage 1's completion.

Goal. The in-repo test adapter implements every template and clone operation, through public APIs and its own framing, and runs the stage's scenarios as one suite.

Today (dev d04d9fb): runtime-adapter-host has launch, reattach, stop, probe and report (tests/runtime-adapter/src/bin/runtime-adapter-host.rs:125-255). #841 and #844 add the create and start paths that their own tests need.

The operations:

Operation Contract
Create, refresh Select the admitted bundle, the profile, the capacities, the boot-online counts, the NIC class and the policy. Return the full key and generation only after the store commit. Never triggered by a restore.
List, inspect The key, the generation, compatibility metadata, eligibility and its reason, state and leases, without loading VM state or hashing
Remove, retire Stop new acquisitions first; report busy while leases remain; never move or delete a leased generation. remove retires, then deletes once the leases drain.
Start from a template An explicit, eligible selection, plus the prepared image, scratch and settings. The outcomes: no template, expired or ineligible, request, host, template, or unresolved teardown. No capture, cold, rehash or format fallback.
Run from a template The visible image preflight, then a managed clone's Start, one execution and teardown

Stacked PRs. PR 2 builds on PR 1; each lands with its own tests.

PR 1 of 2: template operations. Needs #841's PR 3.

  • runtime-adapter-host commands for create, refresh, list, inspect and remove, as the table says.
  • The adapter chooses the store's location and eviction, as any adapter does.
  • Tests: each operation's outcomes, including remove with live leases.

PR 2 of 2: start and run from a template, and the stage's suite. Needs PR 1, #846, and #805's PR 3.

Done when: both PRs are merged, and stage 1's acceptance (#834) passes.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions