Skip to content

feat(docker): support host and bridge supervisor networking - #4016

Merged
drew merged 11 commits into
mainfrom
codex/4015-docker-supervisor-networking
Oct 16, 2026
Merged

drew merged 11 commits into
mainfrom
codex/4015-docker-supervisor-networking

Conversation

@drew

@drew drew commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The Docker supervisor previously required host networking. Add an operator-owned supervisor_network_mode setting so deployments can explicitly use host or bridge networking. Host remains the default, and auto selects host.

Bridge callbacks preserve explicit endpoints and TLS verification. Docker's actual host address is discovered automatically once when the driver starts, so Desktop deployments do not confuse the VM's bridge gateway with the host. All runtime changes are confined to the Docker driver; the supervisor is unchanged.

Related Issue

Related to #4015. Automatic ECI mode selection and ECI sandbox-runtime compatibility remain outside this PR's scope.

Changes

  • Support host and bridge supervisor networking while retaining network=none and the existing isolation requirements for workloads.
  • For bridge mode or a gateway endpoint using host.docker.internal, resolve Docker's host-gateway once during driver construction and cache the IP for all sandbox launches.
  • Use Docker API calls to create a temporary container from the immutable supervisor image, run --help, wait for exit, and download Docker's generated /etc/hosts through the archive endpoint. No shell or docker exec is used.
  • Confine the resolver with no network, all capabilities dropped, no privilege escalation, and a read-only root filesystem. Bound discovery to 30 seconds and perform forced cleanup after success or failure with a separate 10-second timeout.
  • Use the same validated IP for host aliases and the runtime descriptor's host trust pin. An explicit operator-owned host_gateway_ip remains an optional override that skips discovery.
  • Update configuration/runtime docs, the local Docker launcher, and operational guidance, including OTLP endpoint reachability.

Validation

  • Docker driver library tests: 144 passed, 2 opt-in live tests ignored by default.
  • Opt-in Docker API resolver integration test passed on Docker Desktop: discovered 192.168.65.254 and verified no resolver container remained after either successful discovery or a deliberately failed container start.
  • Focused Docker driver Clippy, formatting, Markdown lint, and diff whitespace checks passed.
  • The Docker Desktop sandbox capability probe still fails at seccomp notification qualification under the enabled ECI runtime. Full sandbox E2E remains blocked by that separate runtime limitation.

@copy-pr-bot

copy-pr-bot Bot commented Oct 1, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@drew
drew force-pushed the codex/4015-docker-supervisor-networking branch from d633562 to 16bad48 Compare October 5, 2026 04:20
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

drew added 5 commits October 11, 2026 22:30
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
@drew
drew force-pushed the codex/4015-docker-supervisor-networking branch from 9e2288b to 8f122f7 Compare October 12, 2026 05:34
@drew
drew marked this pull request as ready for review October 12, 2026 23:24
@drew drew added the test:e2e Requires end-to-end coverage label Oct 12, 2026
@github-actions

Copy link
Copy Markdown

Label test:e2e applied for 8f122f7. Open the existing run and click Re-run all jobs to execute with the label set. The run will execute the standard E2E suite after building the required gateway, sandbox, and supervisor images once. The matching required CI gate status on this PR will flip green automatically once the run finishes.

@TaylorMutch TaylorMutch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One non-blocking telemetry concern: bridge mode changes the reachability of loopback OTLP endpoints. This can be addressed here or in a separate follow-up fix if preferred.

I reviewed the full diff and surrounding code and verified the host-gateway alias mapping in a temporary Docker Desktop bridge container. I did not run the full test suite or validate ECI itself.

Comment thread crates/openshell-driver-docker/src/lib.rs
TaylorMutch
TaylorMutch previously approved these changes Oct 13, 2026
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
@drew drew changed the title feat(docker): select supervisor networking for ECI workloads feat(docker): support host and bridge supervisor networking Oct 13, 2026
drew added 5 commits October 13, 2026 11:43
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
@drew
drew enabled auto-merge October 16, 2026 01:13
@drew
drew added this pull request to the merge queue Oct 16, 2026
Merged via the queue into main with commit b2069a2 Oct 16, 2026
121 checks passed
@drew
drew deleted the codex/4015-docker-supervisor-networking branch October 16, 2026 01:57
pimlock added a commit that referenced this pull request Oct 16, 2026
Since #4016, host e2e runs omit the Docker driver's grpc_endpoint and let
the driver discover the gateway. The HTTP session hook test required the
key and panicked. Fall back to loopback, which the host-networked
supervisor shares with the gateway, and read the key only from the
Docker driver table.

Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:e2e Requires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants