Repository navigation
test(e2e): port gateway restart and additional CA tests to testkit suites - #6219
matthewgrossman wants to merge 10 commits into
Conversation
…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>
PR Review StatusThe 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:
Gator metadata
|
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>
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 Blocking findings: None. Carried findings: None. Gator metadata
|
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>
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
|
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>
PR Review StatusMaintainer Convergence DecisionThe 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
|
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>
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
|
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>
|
Maintainer decision on the two held continuity warnings:
|
PR Review StatusMaintainer Convergence DecisionThanks @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
|
|
Maintainer decision on the held fast-restart warning: accepted. Between |
Summary
Ports the remaining legacy gateway-restart and additional destination CA tests from
e2e/rustto testkit suites:sandbox_intentscenario in the continuity suite, so the runner restarts the gateway betweenseedandverify.features/additional-casuite (trust) and the Docker/Podman driver suites (delivery). The tamper and CA-removal checks are dropped (test(continuity): bring back the additional-CA removal checks as a disruption #5917).Supersedes #6216.
Related Issue
Closes #6214
Part of #5297
The Kubernetes (Helm) and VM-overlay paths stay in
e2e/rust/tests/additional_ca.rsfor the Kubernetes (#6213) and VM ports. Whichever of those lands last deletes the file.Changes
Gateway restart
tests/suites/continuity/src/sandbox_intent.rs:seedcreates a running sandbox that records the time and its SSH host key, and a second sandbox that it stops.verifychecks that the running sandbox's first process started afterseed(it was restarted), its host key didn't change, the stopped sandbox is stillStopped, and on VM the relaunched sandbox's token hasn't expired.openshell-continuityprogram over its library, soOPENSHELL_TEST_UNSUPPORTEDentries show as ignored. The/procprobe parser moved tosrc/probe.rswith its test intests/probe.rs.tests/suites/unsupported.yaml:continuity::sandbox_intent::verifyis unsupported onfedora-podman-rootless/rpm-upgrade-sourceuntil fix(server): sandbox deleted during gateway startup sweep stays in Deleting #6242 is fixed.check-conformance-program.shaccepts continuity entries.SandboxBuilder::namedandkeeplet a continuityseedcreate sandboxes that cleanup leaves forverifyto adopt, replacing the CLI create-and-poll loop.compute_driver()accepts the VM driver reporting itself asopenshell-driver-vm.tests/support/vm:ensure_token_livereads the VM driver'ssandbox.pbfromOPENSHELL_TEST_VM_STATE_DIRand checks the sandbox token'sexp.e2e/rust/e2e-vm.shande2e/support/continuity.sh: the VM lane runsseed, restarts its gateway and runsverifyuntil tmachine has a VM row (test(e2e): run testkit families on the VM lane through a KVM host provisioner #5918).gateway_start.rs,podman_gateway_start.rs,vm_gateway_start.rsandlocal_driver_token_restart.rs, and their references ine2e/rust/Cargo.toml,e2e-podman.sh,tests/tmachine/artifacts.nixandTESTING.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 trustsexample.comthrough 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-bundleonce 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 anopenshell-tls-ca-*secret, depending on the userns mode).container-engine-supportgains typedEngine::supervisor,mounts,command,envandsecret_names, plusone_read_only_atandflag_values.additional-ca.yamlplaybook creates a CA, setsadditional_ca_bundlethrough the gateway overrides, and publishesOPENSHELL_TEST_ADDITIONAL_CA_CERT/_KEY. Theadditional-cafeature adds<base>-additional-caenvironments; the Podman userns environments run the playbook too.e2e-vm.sh: additional-CA mode also runsfeatures/additional-ca, signing with the fixture CA (now P-256).additional-carow ine2e-docker-test.yml, thepodman-additional-ca-e2ejob, the handling ine2e-docker.sh/e2e-podman.shandwith-{docker,podman}-gateway.sh, and the Docker/Podman code inadditional_ca.rs.CI rows
gateway_start(Docker)ubuntu-docker-rootful/deb(gateway-restart,upgrade)podman_gateway_startfedora-podman-rootful/rpm(gateway-restart,upgrade)vm_gateway_start,local_driver_token_restartmise run e2e:vm(VM E2E)additional_catrustfeatures/additional-caonubuntu-docker-rootful-additional-ca(deb),fedora-podman-rootful-additional-caandfedora-podman-rootless-additional-ca(rpm);vm-additional-ca-e2eadditional_caDocker deliverydrivers/dockeronubuntu-docker-rootful-additional-caadditional_caPodman deliverydrivers/podmanfedora-podman-*-userns-*rowsTesting
cargo clippy -D warningsandcargo fmt --checkfor the touched suites, testkit and support crates; lockfiles resolve with--lockedexpdecoding andcompute_driverChecklist