Repository navigation
test(tmachine): prepare runner environments for the e2e/rust migration - #5277
Merged
Merged
Conversation
…ateway Every installer loads openshell/e2e-python:dev next to the runtime images, so tests can create sandboxes that run python3, curl, git or openssl. The k3s installers set the chart's server.hostGatewayIP to the node's InternalIP. Tests run on the node, so host.openshell.internal now resolves to it on k3s and k3s-ha. Refs #5275 Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
OPENSHELL_TEST_PYTHON_IMAGE overrides the default openshell/e2e-python:dev, next to OPENSHELL_TEST_BASE_IMAGE. Refs #5275 Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
The runner passes its openshell profile as a nextest tool config and the bundle carries tests/suites/<family>/.config/nextest.toml into the remapped workspace, so a family can set per-test timeouts and test groups, or override the profile. --test-threads defaults to 1, which keeps the serial --no-capture run. Refs #5275 Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
The host-gateway suite starts a server on the host and checks that a sandbox from the Python workload image reaches it through host.openshell.internal. CI runs it on Docker rootful, Podman rootful and rootless, k3s and k3s-ha. Closes #5275 Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
|
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. |
|
Label |
Member
Author
|
/ok to test 061ae1e |
The node can list an IPv6 InternalIP after the IPv4 one, which made the address discovery retry until it failed. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
On k3s-ha, attaching to a main process that already finished can reach a gateway replica without the sandbox's session and fail with "sandbox is not ready". Run the client in a Ready sandbox instead. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Member
Author
|
/ok to test 64c4a0d |
6 tasks
matthewgrossman
marked this pull request as ready for review
November 4, 2026 22:32
matthewgrossman
requested review from
a team,
derekwaynecarr,
mrunalp and
sjenning
as code owners
November 4, 2026 22:32
4 tasks
…ads" This reverts commit 8441388. Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
This was referenced Nov 5, 2026
elezar
reviewed
Nov 5, 2026
elezar
reviewed
Nov 5, 2026
elezar
reviewed
Nov 5, 2026
… trim exports The client needs only the standard library, so run /usr/bin/python3 instead of the image's uv virtual environment and let the policy name its real path. Keep the new image constants private to testkit, and fail the k3s installer if the cluster ever has more than one node, since the host gateway address is the node the tests run on. Refs #5275 Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Tests read the image, CLI binary and gateway settings through functions such as base_image() and python_image(). Nothing outside testkit used the variable-name constants, so keep them private. Refs #5275 Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
Signed-off-by: Matthew Grossman <mgrossman@nvidia.com>
5 of 6 tasks
6 tasks done
elezar
reviewed
Nov 6, 2026
elezar
reviewed
Nov 6, 2026
elezar
approved these changes
Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prepares the tmachine runner environments for porting
e2e/rusttests to the testkit suites:host.openshell.internalresolves on k3s, every environment has the Python workload image. A newhost-gatewayfeature suite proves the first two on every runner row.Related Issue
Closes #5275
Changes
server.hostGatewayIPto it. Tests run on the node, sohost.openshell.internalnow resolves onk3sandk3s-ha. The HA overlay merges over the base values, so it inherits the setting.deb,rpm,binaries,k3s,k3s-ha) now loadsopenshell/e2e-python:dev, along with the runtime images. Tests get it from the newtestkit::python_image(), whichOPENSHELL_TEST_PYTHON_IMAGEoverrides.base_image()still defaults tonvcr.io/nvidia/base/ubuntu:24.04.host-gatewayfeature suite. The test serves HTTP on the host. It starts a sandbox from the Python image, then usessandbox execto run the image's systempython3(standard library only), which requests the page throughhost.openshell.internal. The default policy denies all network access, so the test passes one that names only the host and port, as the docs describe, and lets/usr/bin/python3.*connect. New rows run it on Docker rootful, Podman rootful and rootless,k3s, andk3s-ha.k3s-harace. When a short main process finishes before the CLI attaches, the attach can reach a replica that doesn't hold the sandbox's session. That replica answers "sandbox is not ready", becausesandbox_relay_reachableonly checks sessions on its own replica.e2e/rust. The new test covers the same contract ashost_gateway_alias::sandbox_reaches_host_openshell_internal_via_host_gateway_aliasand the first check inpodman_host_gateway. Both old tests stay until test(e2e): decide which e2e/rust tests to port and in what order #5297 decides their port.podman_host_gatewaystays because it also checks the policy-DNS relay and that the alias survivessandbox stopandsandbox start, which the new test doesn't. Thek3s-haworkaround above should be revisited when fix(server): consistent sandbox access after the main process exits #4950 lands (tracked in feat: consistent sandbox access after the main process exits #4949).--test-threads) were part of this PR and moved to test(runner): apply per-family nextest config and a thread count to runner rows #5295, since no suite uses them yet.TESTING.mddocuments the new suite.Testing
cargo fmt --check,cargo clippy -D warnings, and nextest pass fortests/testkitandtests/suites/features.nix build .#tmachine-configsucceeds. On macOS the VM rows can't run locally, so CI validates them.features/host-gateway)Checklist