Skip to content

test(e2e): port gateway restart and additional CA tests to testkit suites - #6219

Open
matthewgrossman wants to merge 10 commits into
mainfrom
test/6214-port-additional-ca/matthewgrossman
Open

matthewgrossman wants to merge 10 commits into
mainfrom
test/6214-port-additional-ca/matthewgrossman

Conversation

@matthewgrossman

@matthewgrossman matthewgrossman commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

Summary

Ports the remaining legacy gateway-restart and additional destination CA tests from e2e/rust to testkit suites:

Supersedes #6216.

Related Issue

Closes #6214
Part of #5297

The Kubernetes (Helm) and VM-overlay paths stay in e2e/rust/tests/additional_ca.rs for the Kubernetes (#6213) and VM ports. Whichever of those lands last deletes the file.

Changes

Gateway restart

  • tests/suites/continuity/src/sandbox_intent.rs: seed creates a running sandbox that records the time and its SSH host key, and a second sandbox that it stops. verify checks that the running sandbox's first process started after seed (it was restarted), its host key didn't change, the stopped sandbox is still Stopped, and on VM the relaunched sandbox's token hasn't expired.
  • The continuity suite now builds like conformance: an openshell-continuity program over its library, so OPENSHELL_TEST_UNSUPPORTED entries show as ignored. The /proc probe parser moved to src/probe.rs with its test in tests/probe.rs.
  • tests/suites/unsupported.yaml: continuity::sandbox_intent::verify is unsupported on fedora-podman-rootless/rpm-upgrade-source until fix(server): sandbox deleted during gateway startup sweep stays in Deleting #6242 is fixed. check-conformance-program.sh accepts continuity entries.
  • testkit: SandboxBuilder::named and keep let a continuity seed create sandboxes that cleanup leaves for verify to adopt, replacing the CLI create-and-poll loop. compute_driver() accepts the VM driver reporting itself as openshell-driver-vm.
  • tests/support/vm: ensure_token_live reads the VM driver's sandbox.pb from OPENSHELL_TEST_VM_STATE_DIR and checks the sandbox token's exp.
  • e2e/rust/e2e-vm.sh and e2e/support/continuity.sh: the VM lane runs seed, restarts its gateway and runs verify until tmachine has a VM row (test(e2e): run testkit families on the VM lane through a KVM host provisioner #5918).
  • Deletes gateway_start.rs, podman_gateway_start.rs, vm_gateway_start.rs and local_driver_token_restart.rs, and their references in e2e/rust/Cargo.toml, e2e-podman.sh, tests/tmachine/artifacts.nix and TESTING.md.

Additional CA

  • tests/suites/features/additional-ca: separate fetch and handshake probes check that the workload trusts a server whose certificate the additional CA signed, rejects it under a name the certificate doesn't cover, and still trusts example.com through the system roots.
  • tests/suites/drivers/{docker,podman}/tests/additional_ca.rs: the supervisor has exactly one read-only mount of the additional CA, --additional-ca-bundle once in its command, and still gets the gateway's mTLS CA separately (Docker: read-only state volume + OPENSHELL_TLS_CA; Podman: a distinct bind mount or an openshell-tls-ca-* secret, depending on the userns mode). container-engine-support gains typed Engine::supervisor, mounts, command, env and secret_names, plus one_read_only_at and flag_values.
  • tmachine: the additional-ca.yaml playbook creates a CA, sets additional_ca_bundle through the gateway overrides, and publishes OPENSHELL_TEST_ADDITIONAL_CA_CERT/_KEY. The additional-ca feature adds <base>-additional-ca environments; the Podman userns environments run the playbook too.
  • e2e-vm.sh: additional-CA mode also runs features/additional-ca, signing with the fixture CA (now P-256).
  • Removes the Docker and Podman legacy paths: the additional-ca row in e2e-docker-test.yml, the podman-additional-ca-e2e job, the handling in e2e-docker.sh/e2e-podman.sh and with-{docker,podman}-gateway.sh, and the Docker/Podman code in additional_ca.rs.

CI rows

Legacy test Now runs in
gateway_start (Docker) continuity ubuntu-docker-rootful/deb (gateway-restart, upgrade)
podman_gateway_start continuity fedora-podman-rootful/rpm (gateway-restart, upgrade)
vm_gateway_start, local_driver_token_restart mise run e2e:vm (VM E2E)
additional_ca trust features/additional-ca on ubuntu-docker-rootful-additional-ca (deb), fedora-podman-rootful-additional-ca and fedora-podman-rootless-additional-ca (rpm); vm-additional-ca-e2e
additional_ca Docker delivery drivers/docker on ubuntu-docker-rootful-additional-ca
additional_ca Podman delivery the eight drivers/podman fedora-podman-*-userns-* rows

Testing

  • cargo clippy -D warnings and cargo fmt --check for the touched suites, testkit and support crates; lockfiles resolve with --locked
  • Unit tests for the probe parser, JWT exp decoding and compute_driver
  • Continuity, feature, driver and VM E2E in CI

Checklist

…ites

Move the trust checks to tests/suites/features/additional-ca and the Docker and Podman supervisor delivery checks to the driver suites. tmachine environments configure the gateway with a CA through gateway overrides and publish its certificate and key. The VM lane runs the new feature suite in its additional-CA mode. e2e/rust/tests/additional_ca.rs keeps only the Kubernetes and VM paths.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@github-actions github-actions Bot added the state:accepted A maintainer decided OpenShell should pursue this issue label Dec 4, 2026
@matthewgrossman matthewgrossman added the test:e2e Requires end-to-end coverage label Dec 4, 2026
@matthewgrossman
matthewgrossman marked this pull request as ready for review December 4, 2026 16:50
@matthewgrossman
matthewgrossman requested a review from a team as a code owner December 4, 2026 16:50
@gator-review-bot

Copy link
Copy Markdown

gator-agent

PR Review Status

The additional destination CA migration carries the trust checks into testkit and moves the Docker and Podman delivery checks into their driver suites. Required CI passed, including the additional CA suites on Docker, Podman, and VM.

Blocking findings: None.

Carried findings: None.

Non-blocking suggestions:

  • Match all Docker mounts at the additional CA destination before checking that there is exactly one and it is read-only. This makes the assertion check the same invariant as the Podman test.
  • Add a contributor example in TESTING.md showing the ubuntu-docker-rootful-additional-ca environment for the Docker driver and additional CA suites.
Gator metadata
  • Validation: Accepted testkit migration for test(e2e): port gateway-restart and additional-CA tests from e2e/rust #6214 under test(e2e): decide which e2e/rust tests to port and in what order #5297.
  • Docs: Fern updates unnecessary for this internal test migration.
  • Checks: Required CI passed. Maintainer Approval is evaluated at handoff.
  • E2E: test:e2e ran successfully on the current head.
  • Head SHA: 527bd7080673a29acf1a80029115f28e67957d18
  • Base SHA: 34fc27738b50d0305342005bb83af40d687edd42
  • Merge base SHA: 34fc27738b50d0305342005bb83af40d687edd42
  • Patch ID: f6ebcaa5d63c88279ae9414b90976e56e6a40f20
  • Gator payload: 24
  • Review mode: initial
  • Previous reviewed SHA: none
  • Review budget exhausted: no
  • Maintainer decision required: no
  • Next state: gator:approval-needed

@gator-review-bot gator-review-bot Bot added the gator:approval-needed Gator completed review; maintainer approval needed label Dec 4, 2026
gator-review-bot[bot]
gator-review-bot Bot previously approved these changes Dec 4, 2026

@gator-review-bot gator-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

gator-agent

Gator Approval

Gator review is complete and required CI has passed.

Count every supervisor mount at the destination before checking that it is read-only, as the Podman test does. Add a TESTING.md example for running the Docker driver suite in its CI environment.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@gator-review-bot

Copy link
Copy Markdown

gator-agent

PR Review Status

@matthewgrossman, the updated Docker test now counts every mount at each expected destination before checking that the sole mount is read-only. I also checked the new Docker test invocation in TESTING.md. The follow-up review found no blockers, and required Branch Checks and E2E are running.

Blocking findings: None.

Carried findings: None.

Gator metadata
  • Validation: Accepted testkit migration for test(e2e): port gateway-restart and additional-CA tests from e2e/rust #6214 under test(e2e): decide which e2e/rust tests to port and in what order #5297.
  • Docs: Contributor testing instructions updated. The change is internal to testing.
  • Checks: Branch Checks and E2E are running. Other required CI checks passed. Maintainer Approval is evaluated at handoff.
  • E2E: test:e2e workflow is running on this head.
  • Head SHA: 53f9006543c8a349067e24a208c835812803e5b3
  • Base SHA: 34fc27738b50d0305342005bb83af40d687edd42
  • Merge base SHA: 34fc27738b50d0305342005bb83af40d687edd42
  • Patch ID: b4fd017b48990118df066f965a6e880193e6e902
  • Gator payload: 24
  • Review mode: follow_up
  • Previous reviewed SHA: 527bd7080673a29acf1a80029115f28e67957d18
  • Review budget exhausted: no
  • Maintainer decision required: no
  • Next state: gator:watch-pipeline

@gator-review-bot gator-review-bot Bot added gator:watch-pipeline Gator is monitoring PR CI/CD status and removed gator:approval-needed Gator completed review; maintainer approval needed labels Dec 4, 2026
Move the JSON inspect and command-flag helpers that the Docker and Podman additional CA tests each defined into container-engine-support.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@gator-review-bot

Copy link
Copy Markdown

gator-agent

PR Review Status

@matthewgrossman, I reviewed your extraction of the Docker and Podman inspection helpers. I checked both callers, the CA mount and command assertions, and the lockfiles for workspaces that use the shared test crate. The follow-up review found no blockers. Required Branch Checks and E2E are pending.

Blocking findings: None.

Carried findings: None.

Gator metadata
  • Validation: Accepted testkit migration for test(e2e): port gateway-restart and additional-CA tests from e2e/rust #6214 under test(e2e): decide which e2e/rust tests to port and in what order #5297.
  • Docs: The latest changes are internal to the test suites.
  • Checks: Branch Checks and E2E are pending. DCO, Frozen Paths, Helm Lint, and Trivy Changes passed. Maintainer Approval is evaluated at handoff.
  • E2E: The current head's test:e2e run is queued.
  • Head SHA: 5c08cf8caf863713db995eb989df77d2e457c5d9
  • Base SHA: 34fc27738b50d0305342005bb83af40d687edd42
  • Merge base SHA: 34fc27738b50d0305342005bb83af40d687edd42
  • Patch ID: d5e9e21c6366e0ec9ca8ce24708d915decfeb8a9
  • Gator payload: 24
  • Review mode: follow_up
  • Previous reviewed SHA: 53f9006543c8a349067e24a208c835812803e5b3
  • Review budget exhausted: no
  • Maintainer decision required: no
  • Next state: gator:watch-pipeline

Merge gateway_start, podman_gateway_start, vm_gateway_start and the VM
token check from local_driver_token_restart into a sandbox_intent
continuity scenario. The runner's gateway-restart and upgrade
disruptions run it on Docker and Podman; e2e-vm.sh runs seed, restarts
its gateway and runs verify until tmachine has a VM row (#5918).

Part of #6214
Part of #5297

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
The VM driver reports its name as openshell-driver-vm, so sandbox_intent::verify checks the configured driver name directly. Continuity tests now honor OPENSHELL_TEST_UNSUPPORTED, and sandbox_intent::verify is unsupported on fedora-podman-rootless/rpm-upgrade-source until #6242 is fixed.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Build continuity like conformance, as a harness=false program over its library, so unsupported tests are reported as ignored. This replaces the libtest wrapper skip. testkit's compute_driver now accepts the VM driver's reported name, so sandbox_intent::verify uses it.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@matthewgrossman matthewgrossman changed the title test(e2e): port additional CA trust and delivery checks to testkit suites test(e2e): port gateway restart and additional CA tests to testkit suites Dec 4, 2026
@gator-review-bot

Copy link
Copy Markdown

gator-agent

PR Review Status

Maintainer Convergence Decision

The review of the gateway-restart migration found no Critical defects. Gator held two Warnings under the review budget. They concern how the continuity suite checks Docker’s stopped-sandbox state and how it measures restart timing.

Action required: A maintainer should decide whether to authorize Gator to post either Warning for follow-up or accept the current test coverage. Required Branch Checks and E2E are running.

Gator metadata

@gator-review-bot gator-review-bot Bot added gator:blocked Gator is blocked by process or repository gates and removed gator:watch-pipeline Gator is monitoring PR CI/CD status labels Dec 4, 2026
Add SandboxBuilder::named and keep so a continuity seed creates sandboxes that its verify adopts, and use Sandbox::stop, expect_listed and the ready snapshot instead of CLI loops and direct gateway calls. The VM token check moves to vm-support, and seed passes values to sh as arguments.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Add Engine::supervisor, mounts, command, env and secret_names and a one_read_only_at helper to container-engine-support, so the Docker and Podman additional CA tests share one check without indexing JSON values.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Fetch and handshake probes each check one thing, so the test asserts on their output instead of indexing one JSON result. The test host endpoint uses allow_host.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@gator-review-bot

Copy link
Copy Markdown

gator-agent

PR Review Status

@matthewgrossman, I checked your switch to testkit handles in the continuity suite. The Docker test still relies on the gateway's reported phase, and the restart probe still compares whole seconds. The follow-up review found no new Critical defects. Required Branch Checks and E2E are in progress.

Action required: A maintainer should decide whether to accept the current continuity coverage or authorize Gator to post the previously held feedback on Docker stopped-state verification and restart timing.

Gator metadata

@matthewgrossman matthewgrossman added the test:e2e:continuity Run the continuity suites (gateway restart and upgrade) on PR mirrors label Dec 4, 2026
Process start times are derived from the kernel's whole-second boot time, which can move by a second, so a sandbox that never restarted could appear to start after seed. Require the restart to be at least 2 seconds later.

Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
@matthewgrossman

Copy link
Copy Markdown
Member Author

Maintainer decision on the two held continuity warnings:

  • Docker stopped-state verification: accepted as is. The continuity suite checks only gateway-reported state so it stays driver-neutral. Engine-level checks belong in the driver suites.
  • Restart timing in whole seconds: fixed in ed0ada7. verify now requires the restarted process to start at least 2 seconds after seed, so a one-second shift in the kernel's boot time can't make a sandbox that never restarted pass.

@gator-review-bot

Copy link
Copy Markdown

gator-agent

PR Review Status

Maintainer Convergence Decision

Thanks @matthewgrossman. I checked the Docker stopped-state assertion against your decision to keep the continuity suite driver-neutral. I also checked the new two-second threshold against the original one-second clock shift. The threshold addresses that false pass. The follow-up review found no Critical defects and held one new Warning about whether a fast, successful restart could fail the new timing check.

Please confirm whether to accept that trade-off or authorize Gator to post the held feedback. Required Branch Checks and E2E are running.

Gator metadata
  • Validation: Accepted testkit migration for test(e2e): port gateway-restart and additional-CA tests from e2e/rust #6214 under test(e2e): decide which e2e/rust tests to port and in what order #5297.
  • Docs: Internal continuity test change.
  • Checks: Branch Checks and E2E are in progress. DCO, Frozen Paths, Helm Lint, and Trivy Changes passed.
  • E2E: Branch E2E Checks is running with test:e2e and test:e2e:continuity selected.
  • Head SHA: ed0ada7bff1e0469f37e81fca182d684d499a00b
  • Base SHA: 34fc27738b50d0305342005bb83af40d687edd42
  • Merge base SHA: 34fc27738b50d0305342005bb83af40d687edd42
  • Patch ID: 184f5c7985db79441acfe389c0b69618efbc7016
  • Gator payload: 24
  • Review mode: critical_only
  • Previous reviewed SHA: 8156a00bbc7ade8316710b555a093841e8252232
  • Review budget exhausted: yes
  • Maintainer decision required: yes, for the held Warning about fast successful restarts.
  • Next state: gator:blocked
  • Blocked reason: review_convergence_decision_required

@matthewgrossman

Copy link
Copy Markdown
Member Author

Maintainer decision on the held fast-restart warning: accepted. Between seed recording its time and the sandbox starting again, the run finishes seed, applies the disruption (gateway restart or upgrade) and waits for the gateway to relaunch the sandbox, which takes well over 3 seconds. If the check ever fails, its message names both times.

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

gator:blocked Gator is blocked by process or repository gates state:accepted A maintainer decided OpenShell should pursue this issue test:e2e:continuity Run the continuity suites (gateway restart and upgrade) on PR mirrors test:e2e Requires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(e2e): port gateway-restart and additional-CA tests from e2e/rust

1 participant