Repository navigation
Conversation
|
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. |
|
🌿 Preview your docs: https://nvidia-preview-pr-4461.docs.buildwithfern.com/openshell |
Compatibility review (advisory)Needs review No source-level SDK, CLI, configuration, policy, Helm, or state contract changes were found. Qualification remains incomplete because release VM drivers embed newly hashed Linux runtime archives whose semantic delta is unavailable in the supplied source. Not inspected: api-behavior 1. api-behavior — NOT ACKEDThe pinned x86_64 and aarch64 Linux VM runtime archive hashes changed, but the archive contents and semantic differences are not present in the supplied source.
Review details
Advisory review; publication gates are unchanged. |
SDAChess
left a comment
There was a problem hiding this comment.
Some questions, I'm surprised there are changes related to the VM driver, are these on purpose?
| const PROBE: &str = r#" | ||
| set -eu | ||
| test "${TMACHINE_CDI_SPEC_0:-}" = "${TMACHINE_CDI_DEVICE_0:+fixture}" | ||
| test "${TMACHINE_CDI_SPEC_1:-}" = "${TMACHINE_CDI_DEVICE_1:+fixture}" | ||
| for index in 0 1; do | ||
| eval "selected=\${TMACHINE_CDI_DEVICE_${index}:-}" | ||
| mount=/usr/share/openshell-cdi/device-$index | ||
| if [ "$selected" = "$index" ]; then | ||
| test "$(cat "$mount")" = "tmachine-cdi-$index" | ||
| printf 'device=%s\n' "$index" | ||
| else | ||
| test -z "$selected" | ||
| test ! -e "$mount" | ||
| fi | ||
| done | ||
| test -z "${TMACHINE_CDI_UNRELATED:-}" | ||
| "#; |
There was a problem hiding this comment.
Let's be careful here about portability of this test. Not sure if running bash here is a good idea.
| async fn no_gpu_request_has_no_cdi_edits() { | ||
| check_case("cdi-none", None, None, r#" | ||
| set -eu | ||
| test -z "${TMACHINE_CDI_SPEC_0:-}${TMACHINE_CDI_SPEC_1:-}${TMACHINE_CDI_DEVICE_0:-}${TMACHINE_CDI_DEVICE_1:-}${TMACHINE_CDI_UNRELATED:-}" | ||
| for index in 0 1; do | ||
| test ! -e /usr/share/openshell-cdi/device-$index | ||
| done | ||
| "#, Some(&[]), None).await; | ||
| } |
There was a problem hiding this comment.
If there is no other way to check than to run some bash code then let's do that, but I would feel better about having these checks be Rust code.
| aarch64-linux = { | ||
| platform = "linux-aarch64"; | ||
| hash = "sha256-7FNqUtC6ixfw202EyoYCgZOLdyxJYfg/YzdlkTT/+sM="; | ||
| hash = "sha256-Yk5Rxn6JWxMu82Vkyx3eSAxh5/mnfUwcNDNeDIQJz4c="; |
There was a problem hiding this comment.
I wonder why this was updated. Did we push an update that was not used before? Interesting that we are not testing this anywhere in the CI, I guess we are now.
There was a problem hiding this comment.
Created #4600 to track. The vm-runtime was added here because the debian package includes the VM driver.
There was a problem hiding this comment.
This PR adds building debian which rebuilds the VM driver and that triggers this refresh. Similarly in #4598
844e44f to
e9fa277
Compare
Have the openshell client role publish the installed gateway's name, active TOML path, service scope, service user, and network, and add an openshell_test_gateway role that loads that context, resolves the CLI, restarts the gateway service, and collects its journal. A feature suite can then change the gateway's active configuration for its own run and restore it afterwards. Select the candidate runtime images for packaged installs through a qualification gateway.toml referenced by OPENSHELL_GATEWAY_CONFIG instead of OPENSHELL_* variables in the service environment file, so the gateway has a TOML file a suite can modify. Update the packaging asset check to match. Signed-off-by: Evan Lezar <elezar@nvidia.com>
Define each CDI scenario once in vars/scenarios.yaml: the host fixtures it needs (directories, files, a character device, a socket), the CDI edits that reference them, and the behavior the workload is expected to observe. The cdi_fixtures role creates the fixtures, renders one tmachine.example/cdi-scenario spec with a device per scenario, and publishes the expectations as scenarios.json. Install the spec into /var/run/cdi from systemd-tmpfiles on every boot so it survives tmachine's setup, installation, and test disk layers, and run the role as part of the ubuntu-docker-rootful setup. Signed-off-by: Evan Lezar <elezar@nvidia.com>
Add a cdi feature suite that creates a sandbox for each CDI scenario by selecting its device explicitly with --gpu 1 and the Docker cdi_devices driver option, then checks what the workload observes or that creation is rejected. The sandbox only reports facts; the test makes every assertion, so a failure names the check that disagreed. Each scenario is its own test. The expectations record the behavior the sandbox has today, loaded from the scenarios.json published by the fixtures role. A OPENSHELL_CDI_CAPTURE mode prints observations instead of asserting, to record that behavior for a new scenario. The test playbook enables caller driver configuration in the installed gateway's active TOML for the run and restores it afterwards. Build the suite's nextest archive in tests/artifacts.nix, expose it as build-artifacts-cdi-tests, and run the suite on the Docker environment with the deb installer in the branch and release matrices. Signed-off-by: Evan Lezar <elezar@nvidia.com>
360f6d5 to
01b0b55
Compare
e9fa277 to
fb39ac1
Compare
Summary
Add hardware-free Docker CDI injection coverage to tmachine and build local Debian artifacts for package-installed qualification. The Docker environment recreates dummy YAML CDI specs on each boot, and the feature suite checks environment and mount injection through the installed OpenShell CLI.
Stacked on #4529 (
codex/cdi-name-parser). PR #4204 builds on this test harness.Related Issue
Related to #4460. This PR supplies the initial CDI test infrastructure; the issue remains open to track follow-up coverage.
Changes
Build the CLI, gateway, prover, VM init, and VM driver with its embedded Linux runtime in
build-artifacts-binaries; package staged inputs withbuild-artifacts-deband include both steps inbuild-artifacts.Refresh the verified Linux VM runtime archive checksums.
Generate two fake NVIDIA CDI devices plus an unrelated vendor spec, using file mounts and
TMACHINE_CDI_*environment markers. No GPU hardware or device nodes are required.Add eight tests for explicit/default/count selection, absence of injection without a GPU request, and invalid requests. Keep the existing reserved
OPENSHELL_*environment behavior unchanged.Publish installed-gateway test context and temporarily enable caller device selection in a qualification TOML, restoring it after the tests. Retain the package-owned service and client authentication.
Add Docker CDI coverage to branch and release feature-test matrices and document local commands.
Add ten explicitly selected
tmachine.example/cdi-policydevices for read-only and writable mounts, library parents, device nodes, supplementary GIDs, and Unix sockets. Keep them outside the automatic GPU inventory. Supply persistent source data and a reboot-restored echo socket; these fixtures do not yet have scenario-specific assertions in the eight-test suite.Testing
nix run .#tmachine -- test ubuntu-docker-rootful deb cdion local ARM64 using freshly built DEB and matching runtime images.build-artifacts-binariesandbuild-artifacts-debcommands passed; DEB packaging ran without invoking Cargo. Package architecture, version, and payload inspected.test-packaging-assets.shpassed with Debian tooling available.Local executable validation was ARM64; the x86_64 builder was evaluated but not executed locally. Real GPU execution, Podman, and Kubernetes CDI coverage are outside this change. Synthetic device-node fixtures are included; device-node behavior assertions remain follow-up work.
Checklist