Skip to content

refactor(compute): unify gateway restart reconciliation - #2743

Open
drew wants to merge 1 commit into
mainfrom
refactor/2417-unify-driver-restart/drew
Open

refactor(compute): unify gateway restart reconciliation#2743
drew wants to merge 1 commit into
mainfrom
refactor/2417-unify-driver-restart/drew

Conversation

@drew

@drew drew commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Remove the Docker-only gateway shutdown/startup lifecycle hooks. Gateway shutdown now leaves durable local compute alone, while startup reconciles persisted running intent through the shared idempotent ComputeDriver::StartSandbox RPC for Docker, Podman, and VM drivers.

Related Issue

Part of #2417

Changes

  • remove Docker-specific shutdown cleanup and stop_managed_containers_on_shutdown
  • reconcile running-intent Docker, Podman, and VM sandboxes through the compute-driver contract at gateway startup
  • leave explicitly stopped sandboxes stopped and keep Kubernetes on its cluster-owned lifecycle
  • add unit coverage for driver selection, phase filtering, missing resources, and start failures
  • extend Docker, Podman, and VM restart E2Es to cover running and explicitly stopped intent
  • document the driver-neutral shutdown/restart contract

Testing

  • mise run pre-commit passes
  • Unit tests added/updated
  • E2E tests added/updated (if applicable)

Commands run:

  • cargo test -q -p openshell-server start_persisted_sandboxes --lib — passed
  • cargo test --no-run --features e2e-docker,e2e-podman,e2e-vm in e2e/rust — passed
  • OPENSHELL_E2E_DOCKER_TEST=gateway_start mise run e2e:docker — passed
  • OPENSHELL_E2E_PODMAN_TEST=podman_gateway_start mise run e2e:podman — not run; host has no Podman CLI
  • mise run e2e:vm — blocked twice by the existing VM smoke test before the restart test (supervisor/SSH relay readiness failure)
  • mise run test — all completed suites passed except the unrelated gateway_completer_returns_empty_when_no_config, which reproduces in isolation because this host has registered gateway config

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

Remove the Docker-specific gateway shutdown cleanup and reconcile persisted running intent through ComputeDriver::StartSandbox for Docker, Podman, and VM drivers. Explicitly stopped sandboxes remain stopped.

Closes #2417

Signed-off-by: Drew Newberry <anewberry@nvidia.com>
@github-actions

Copy link
Copy Markdown

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.

1 participant