Skip to content

feat(drivers): launch the VM and Podman drivers with a Configure call - #5894

Draft
elezar wants to merge 9 commits into
mainfrom
feat/5385-driver-launch-configure/elezar
Draft

elezar wants to merge 9 commits into
mainfrom
feat/5385-driver-launch-configure/elezar

Conversation

@elezar

@elezar elezar commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Launch the VM and Podman compute drivers as separate processes configured over a DriverLaunch gRPC service (GetLaunchInfo, Configure) instead of a startup document. This is an alternative to #5838, built on main as nine commits ordered for review.

Related Issue

Closes #5385
Related: #5384, #5200

Changes

  • openshell-otel: install_deferred_driver_tracing installs console tracing at once and enables OTLP export when Configure supplies telemetry.
  • proto/driver_launch.proto and openshell-driver-launch: launch protocol, once-only Configure with retry after failure, and a ComputeDriver wrapper that returns UNAVAILABLE until configured.
  • openshell-driver-sdk: shared Configure telemetry helpers, staged network trust artifact loader, parent-death handling, and probe/preflight results.
  • VM and Podman drivers: serve --bind-socket --expected-peer-pid --log-level, configuration from Configure, and preflight reading the encoded request from stdin. Podman adds probe.
  • Gateway: a generic launcher sends the operator's driver table as opaque TOML, plus the gateway context, typed image overrides, telemetry and the network trust artifact path, digest and count. It checks binary trust and stops the gateway when a launched driver exits. Podman is no longer linked into the gateway; auto-detection uses probe, and config preflight uses each driver's preflight.
  • Docs and packaging: the launched-driver section of the gateway configuration docs; the Podman driver binary is built and shipped in the Debian and RPM packages.

Deferred: enforcing --expected-peer-pid in shared code (VM keeps its own check) and driver restart after a crash.

Release Notes

The gateway now runs the Podman driver as a separate openshell-driver-podman binary, installed next to openshell-driver-vm.

Testing

  • cargo fmt --check and cargo clippy --all-targets -D warnings pass on every commit for the changed crates
  • cargo test passes for gateway, server, VM, Podman, driver SDK, driver launch and otel; tasks/scripts/test-packaging-assets.sh passes
  • Unit tests added/updated, including serve/Configure integration tests against the real VM and Podman binaries and a late-export test for deferred tracing
  • E2E tests added/updated (if applicable)

Checklist

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

@github-actions github-actions Bot added the state:accepted A maintainer decided OpenShell should pursue this issue label Nov 23, 2026
@github-actions

Copy link
Copy Markdown

matrix:
include:
- triple: x86_64-unknown-linux-gnu
runner: linux-amd64-cpu8
- triple: x86_64-unknown-linux-gnu
runner: linux-amd64-cpu8
- triple: aarch64-unknown-linux-gnu
runner: linux-arm64-cpu8
A launched driver logs before the gateway has sent its telemetry
settings. install_deferred_driver_tracing installs console logging at
start with an empty export slot, and DeferredDriverTracing::enable_export
fills it once. The span filter stays outside the slot because a per-layer
filter added by a reload is never registered with the subscriber.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
A gateway-launched driver starts with only its socket, the gateway's PID
and the log level, and serves the DriverLaunch service from
proto/driver_launch.proto at once. GetLaunchInfo reports the driver's
name, version and protocol version; Configure carries the gateway
context, the staged network trust artifact, typed image overrides,
telemetry and the operator's driver table as opaque TOML.

openshell-driver-launch provides the generated types, a Configure
service that applies the request at most once and allows a retry after
a failure, and a ComputeDriver wrapper that returns UNAVAILABLE until
then.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
openshell-driver-sdk holds what launched drivers share on top of the
launch protocol: applying Configure telemetry to supervisor OTLP
settings and the driver's own export, loading and re-verifying the
gateway's staged network trust artifact, stopping with the gateway, and
the bounded JSON results of the probe and preflight subcommands.

The VM driver's network trust loader moves here unchanged.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
…gure

openshell-driver-vm serve binds the socket with only --bind-socket,
--expected-peer-pid and --log-level, keeps its peer PID check, and
returns UNAVAILABLE from ComputeDriver until Configure succeeds.
Configure decodes the operator's [openshell.drivers.vm] table, which the
driver now owns and validates, applies the gateway context, telemetry
and network trust artifact, and defaults the sandbox endpoint to the
gateway's listener as before. A rejected Configure leaves the driver
running so the gateway can retry.

preflight reads the same request from stdin and validates it without
starting the driver. The standalone flag mode is unchanged.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
The gateway starts openshell-driver-vm serve with only the socket, its
own PID and the log level, checks GetLaunchInfo, and sends one
Configure request built by a generic launcher: the VM table serialized
unchanged as opaque TOML, the gateway context, the staged network trust
artifact, telemetry and typed image overrides. The OTLP and driver
flags it used to pass on argv are gone.

config preflight now validates the VM table by running the driver's
preflight with the same request on stdin, so validation stays with the
driver that owns the table. The launcher only runs a driver binary from
a trusted path and stops the gateway if a launched driver exits.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
openshell-driver-podman serve binds the socket with only --bind-socket,
--expected-peer-pid and --log-level, installs console tracing at once,
and builds the driver inside Configure from the operator's
[openshell.drivers.podman] table, the gateway context, telemetry,
the staged network trust artifact and typed image overrides. Until then
ComputeDriver returns UNAVAILABLE; a rejected Configure leaves the
driver running so the gateway can retry.

probe reports whether a Podman socket is reachable, for gateway
auto-detection, and preflight validates a Configure request read from
stdin without starting the driver. The standalone flag mode and the
in-process library are unchanged.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
The gateway no longer links openshell-driver-podman. It starts
openshell-driver-podman serve and configures it through the same
launcher as the VM driver, sending the Podman table unchanged as opaque
TOML with typed image overrides, the gateway context, telemetry and the
staged network trust artifact.

Auto-detection runs the driver's probe, keeping the existing order and
treating a missing, untrusted, failing or slow binary as unavailable.
config preflight validates the Podman table with the driver's preflight.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
…ivers

Document where the gateway finds driver binaries and which it refuses,
the serve bootstrap and Configure call, the opaque driver tables,
fail-fast on a driver exit, Podman probe detection, and preflight.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
The gateway now launches openshell-driver-podman instead of linking it,
so build the binary for Linux and install it next to the VM driver in
/usr/libexec/openshell in the Debian and RPM packages and the test
machine artifacts.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
@elezar
elezar force-pushed the feat/5385-driver-launch-configure/elezar branch from 3d0735a to f1fbdc6 Compare November 23, 2026 13:28
@github-actions

Copy link
Copy Markdown

Compatibility review (advisory)

New or updated breaking changes; see the full report for all findings.

1. cli — No explicit risk acceptance found

openshell-gateway --compute-driver podman previously needed no companion driver executable; it now requires openshell-driver-podman, which standalone release packaging omits.

  • Impact: Existing standalone Linux Podman installations fail startup and configuration preflight with “podman compute driver binary not found,” while auto-detection can skip Podman and select Docker.
  • Action: For v0.1.10, transparently bundle and install openshell-driver-podman through every existing standalone distribution path, or retain gateway-only Podman operation.
  • PR: feat(drivers): launch the VM and Podman drivers with a Configure call #5894
Review details
  • Execution: complete
  • Candidate: PR #5894 (952e57468666c5f5938f8858656feaa65604c85a)
  • Baseline: c3f429bd69ddd477d65acbc2b188067a9c347ed9 (c3f429bd69ddd477d65acbc2b188067a9c347ed9)
  • Reviewed: rust-sdk, python-sdk, api-behavior, cli, configuration, policy, helm, state

Advisory review; publication gates are unchanged.

Branch check run

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:accepted A maintainer decided OpenShell should pursue this issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: pass launched drivers a versioned startup document

2 participants