Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/e2e-suites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ jobs:
{"environment":"fedora-podman-rootless","installer":"rpm","family":"conformance","package":"conformance","gateway":"openshell","runner":"ubuntu-24.04","test_threads":4},
{"environment":"ubuntu-k3s","installer":"k3s","family":"conformance","package":"conformance","gateway":"tmachine","runner":"ubuntu-24.04","test_threads":4},
{"environment":"ubuntu-k3s","installer":"k3s-ha","family":"conformance","package":"conformance","gateway":"tmachine","runner":"ubuntu-24.04","test_threads":4},
{"environment":"ubuntu-docker-rootful-config-push","installer":"deb","family":"conformance","package":"conformance","gateway":"openshell","runner":"ubuntu-24.04","test_threads":4},
{"environment":"ubuntu-k3s-ipv6","installer":"k3s-ha","family":"conformance","package":"conformance","gateway":"tmachine","runner":"ubuntu-24.04","test_threads":4},
{"environment":"ubuntu-docker-rootful-cdi","installer":"deb","family":"features","package":"cdi","gateway":"openshell","runner":"ubuntu-24.04"},
{"environment":"fedora-podman-rootful-cdi","installer":"rpm","family":"features","package":"cdi","gateway":"openshell","runner":"ubuntu-24.04"},
Expand Down
8 changes: 8 additions & 0 deletions e2e/with-docker-gateway.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,14 @@ if [ "${IMAGE_UPDATES_MODE}" = "1" ] && [ -n "${OPENSHELL_GATEWAY_ENDPOINT:-}" ]
exit 2
fi

# The gateway this wrapper starts reads OPENSHELL_CONFIG_DELIVERY_MODE; an
# existing gateway ignores it and may poll, so a push lane could pass without
# testing push.
if [ -n "${OPENSHELL_CONFIG_DELIVERY_MODE:-}" ] && [ -n "${OPENSHELL_GATEWAY_ENDPOINT:-}" ]; then
echo "ERROR: OPENSHELL_CONFIG_DELIVERY_MODE requires a new gateway owned by this wrapper; unset OPENSHELL_GATEWAY_ENDPOINT." >&2
exit 2
fi

if [ "${OIDC_MODE}" = "1" ] && [ -z "${OIDC_ISSUER}" ]; then
echo "ERROR: OPENSHELL_E2E_OIDC_ISSUER is required when OPENSHELL_E2E_OIDC_GATEWAY=1" >&2
exit 2
Expand Down
5 changes: 5 additions & 0 deletions tasks/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@ description = "Run the testkit suites in tests/suites/conformance against a Dock
depends = ["e2e:workload:build"]
run = "e2e/with-docker-gateway.sh cargo nextest run --locked --manifest-path tests/suites/conformance/Cargo.toml --workspace --test-threads 1 --no-fail-fast"

["e2e:testkit:push"]
description = "Run the conformance suite against a Docker gateway that pushes configuration"
env = { OPENSHELL_CONFIG_DELIVERY_MODE = "push", OPENSHELL_E2E_DOCKER_FEATURES = "e2e-conformance-only" }
run = "e2e/rust/e2e-docker.sh"

["e2e:rust:push"]
description = "Run conformance and policy e2e tests against a Docker gateway that pushes configuration"
env = { OPENSHELL_CONFIG_DELIVERY_MODE = "push", OPENSHELL_E2E_DOCKER_FEATURES = "e2e-config-push", OPENSHELL_E2E_DOCKER_TEST = "config_push policy_activation" }
Expand Down
25 changes: 25 additions & 0 deletions tests/tmachine/ansible/playbooks/config-push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

# Make the gateway push configuration to supervisors.
#
# Adds `[openshell.gateway] config_delivery_mode = "push"` to the gateway
# overrides (the gateway_overrides role), which the `binaries`, `deb` and
# `rpm` installers apply to the gateway's configuration (k3s installers
# ignore it).
---
- name: Gateway configuration push for tests
hosts: all
gather_facts: false
tasks:
- name: Wait for SSH
ansible.builtin.wait_for_connection:

- name: Write the configuration delivery mode
Comment thread
pimlock marked this conversation as resolved.
Resolved
ansible.builtin.include_role:
name: gateway_overrides
vars:
gateway_overrides_name: config-push
gateway_overrides_content: |
[openshell.gateway]
config_delivery_mode = "push"
6 changes: 6 additions & 0 deletions tests/tmachine/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ let
bases = dockerBases ++ podmanBases;
setup.playbooks = [ "ansible/playbooks/cdi.yaml" ];
};
# A gateway that pushes configuration to supervisors
# (`config_delivery_mode = "push"`), for the conformance family.
config-push = {
bases = dockerBases;
setup.playbooks = [ "ansible/playbooks/config-push.yaml" ];
};
};
featureEnvironments = pkgs.lib.concatMap (
feature: map (base: withSetup base feature features.${feature}.setup) features.${feature}.bases
Expand Down
Loading