From 34c5c9aad84fe9d326712ce51dc7728fba69caf4 Mon Sep 17 00:00:00 2001 From: Matthew Grossman Date: Fri, 4 Dec 2026 15:27:34 -0800 Subject: [PATCH 1/4] fix(e2e): register the k3s tmachine gateways as openshell The k3s and k3s-ha installers registered their gateway as tmachine only because the openshell_client role defaults to that name. Name it openshell, as the packaged installers do, so every installer a suite row uses registers the same gateway. The HA playbook's mTLS bundle path and baseline removal change with it. Signed-off-by: Matthew Grossman --- .github/workflows/e2e-suites.yml | 20 +++++++++---------- .../ansible/playbooks/openshell-k3s-ha.yaml | 7 ++++--- .../ansible/playbooks/openshell-k3s.yaml | 1 + 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/e2e-suites.yml b/.github/workflows/e2e-suites.yml index 3de3608656..84a00c2209 100644 --- a/.github/workflows/e2e-suites.yml +++ b/.github/workflows/e2e-suites.yml @@ -88,8 +88,8 @@ jobs: set -euo pipefail # Only amd64 for now: CI has no arm64 runner with KVM for tmachine, # and the caller only builds amd64 inputs. The gateway is the name the - # installer registers with the CLI: `openshell` for the packages, - # `tmachine` for the k3s and binaries installers. A row without a + # installer registers with the CLI: `openshell` for the packages + # and the k3s installers. A row without a # package runs every package in the workspace; each driver suite is a # workspace of its own. rows='[ @@ -97,10 +97,10 @@ jobs: {"environment":"ubuntu-docker-rootful","installer":"deb-external-docker-driver","family":"conformance","package":"conformance","gateway":"openshell","runner":"ubuntu-24.04","external_driver":true,"test_threads":4}, {"environment":"fedora-podman-rootful","installer":"rpm","family":"conformance","package":"conformance","gateway":"openshell","runner":"ubuntu-24.04","test_threads":4}, {"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-k3s","installer":"k3s","family":"conformance","package":"conformance","gateway":"openshell","runner":"ubuntu-24.04","test_threads":4}, + {"environment":"ubuntu-k3s","installer":"k3s-ha","family":"conformance","package":"conformance","gateway":"openshell","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-k3s-ipv6","installer":"k3s-ha","family":"conformance","package":"conformance","gateway":"openshell","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"}, {"environment":"fedora-podman-rootless-cdi","installer":"rpm","family":"features","package":"cdi","gateway":"openshell","runner":"ubuntu-24.04"}, @@ -119,13 +119,13 @@ jobs: {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"host-gateway","gateway":"openshell","runner":"ubuntu-24.04"}, {"environment":"fedora-podman-rootful","installer":"rpm","family":"features","package":"host-gateway","gateway":"openshell","runner":"ubuntu-24.04"}, {"environment":"fedora-podman-rootless","installer":"rpm","family":"features","package":"host-gateway","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-k3s","installer":"k3s","family":"features","package":"host-gateway","gateway":"tmachine","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-k3s","installer":"k3s-ha","family":"features","package":"host-gateway","gateway":"tmachine","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-k3s","installer":"k3s","family":"features","package":"host-gateway","gateway":"openshell","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-k3s","installer":"k3s-ha","family":"features","package":"host-gateway","gateway":"openshell","runner":"ubuntu-24.04"}, {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"routable-host-ip","gateway":"openshell","runner":"ubuntu-24.04"}, {"environment":"fedora-podman-rootful","installer":"rpm","family":"features","package":"routable-host-ip","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-k3s","installer":"k3s","family":"features","package":"routable-host-ip","gateway":"tmachine","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-k3s","installer":"k3s-ha","family":"features","package":"routable-host-ip","gateway":"tmachine","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-k3s-ipv6","installer":"k3s-ha","family":"features","package":"policy-dns-ipv6","gateway":"tmachine","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-k3s","installer":"k3s","family":"features","package":"routable-host-ip","gateway":"openshell","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-k3s","installer":"k3s-ha","family":"features","package":"routable-host-ip","gateway":"openshell","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-k3s-ipv6","installer":"k3s-ha","family":"features","package":"policy-dns-ipv6","gateway":"openshell","runner":"ubuntu-24.04"}, {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"connect-ssh-supervision","gateway":"openshell","runner":"ubuntu-24.04"}, {"environment":"ubuntu-docker-rootful-middleware-http-hooks","installer":"deb","family":"features","package":"middleware-http-hooks","gateway":"openshell","runner":"ubuntu-24.04"}, {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"resource-limits","gateway":"openshell","runner":"ubuntu-24.04"}, diff --git a/tests/tmachine/ansible/playbooks/openshell-k3s-ha.yaml b/tests/tmachine/ansible/playbooks/openshell-k3s-ha.yaml index 3518cc1a7f..138fd80aac 100644 --- a/tests/tmachine/ansible/playbooks/openshell-k3s-ha.yaml +++ b/tests/tmachine/ansible/playbooks/openshell-k3s-ha.yaml @@ -75,7 +75,7 @@ - name: Create guest mTLS directory ansible.builtin.file: - path: /home/tmachine/.config/openshell/gateways/tmachine/mtls + path: /home/tmachine/.config/openshell/gateways/openshell/mtls state: directory owner: tmachine group: tmachine @@ -84,7 +84,7 @@ - name: Write guest client TLS bundle ansible.builtin.copy: content: "{{ (k3s_client_tls.stdout | from_json).data[item] | b64decode }}" - dest: "/home/tmachine/.config/openshell/gateways/tmachine/mtls/{{ item }}" + dest: "/home/tmachine/.config/openshell/gateways/openshell/mtls/{{ item }}" owner: tmachine group: tmachine mode: "0600" @@ -95,7 +95,7 @@ - name: Remove baseline guest gateway registration become: false ansible.builtin.command: - argv: [/usr/local/bin/openshell, gateway, remove, tmachine] + argv: [/usr/local/bin/openshell, gateway, remove, openshell] - name: Register guest gateway ansible.builtin.include_role: @@ -104,3 +104,4 @@ become: false vars: openshell_client_gateway_endpoint: "https://openshell.openshell.svc.cluster.local:{{ k3s_gateway_port }}" + openshell_client_gateway_name: openshell diff --git a/tests/tmachine/ansible/playbooks/openshell-k3s.yaml b/tests/tmachine/ansible/playbooks/openshell-k3s.yaml index 7a1fab8ed1..210cfe5b40 100644 --- a/tests/tmachine/ansible/playbooks/openshell-k3s.yaml +++ b/tests/tmachine/ansible/playbooks/openshell-k3s.yaml @@ -234,5 +234,6 @@ gather_facts: false vars: openshell_client_gateway_endpoint: "http://{{ k3s_gateway_authority }}" + openshell_client_gateway_name: openshell roles: - openshell_client From ff4c3bdd59b6caabf57e22c1c818257dbbd15d36 Mon Sep 17 00:00:00 2001 From: Matthew Grossman Date: Fri, 4 Dec 2026 15:29:24 -0800 Subject: [PATCH 2/4] ci(e2e): default the suite row gateway to openshell Every installer a row uses registers the gateway openshell, so rows no longer repeat it. A row can still set gateway to override the runner's default. Signed-off-by: Matthew Grossman --- .github/workflows/e2e-suites.yml | 143 ++++++++++++++++--------------- 1 file changed, 73 insertions(+), 70 deletions(-) diff --git a/.github/workflows/e2e-suites.yml b/.github/workflows/e2e-suites.yml index 84a00c2209..81698048e2 100644 --- a/.github/workflows/e2e-suites.yml +++ b/.github/workflows/e2e-suites.yml @@ -87,78 +87,78 @@ jobs: run: | set -euo pipefail # Only amd64 for now: CI has no arm64 runner with KVM for tmachine, - # and the caller only builds amd64 inputs. The gateway is the name the - # installer registers with the CLI: `openshell` for the packages - # and the k3s installers. A row without a + # and the caller only builds amd64 inputs. A row may set `gateway` + # to the name its installer registers with the CLI; the default is + # `openshell`, which every installer a row uses registers. A row without a # package runs every package in the workspace; each driver suite is a # workspace of its own. rows='[ - {"environment":"ubuntu-docker-rootful","installer":"deb","family":"conformance","package":"conformance","gateway":"openshell","runner":"ubuntu-24.04","test_threads":4}, - {"environment":"ubuntu-docker-rootful","installer":"deb-external-docker-driver","family":"conformance","package":"conformance","gateway":"openshell","runner":"ubuntu-24.04","external_driver":true,"test_threads":4}, - {"environment":"fedora-podman-rootful","installer":"rpm","family":"conformance","package":"conformance","gateway":"openshell","runner":"ubuntu-24.04","test_threads":4}, - {"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":"openshell","runner":"ubuntu-24.04","test_threads":4}, - {"environment":"ubuntu-k3s","installer":"k3s-ha","family":"conformance","package":"conformance","gateway":"openshell","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":"openshell","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"}, - {"environment":"fedora-podman-rootless-cdi","installer":"rpm","family":"features","package":"cdi","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-docker-rootful-driver-config","installer":"deb","family":"features","package":"driver-config","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootful-driver-config","installer":"rpm","family":"features","package":"driver-config","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootless-driver-config","installer":"rpm","family":"features","package":"driver-config","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-docker-rootful-corporate-proxy","installer":"deb","family":"features","package":"corporate-proxy","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootful-corporate-proxy","installer":"rpm","family":"features","package":"corporate-proxy","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootless-corporate-proxy","installer":"rpm","family":"features","package":"corporate-proxy","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-docker-rootful-keycloak","installer":"deb","family":"features","package":"keycloak-provider-refresh","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"gateway-mtls","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-docker-rootful-oidc","installer":"deb","family":"features","package":"oidc-auth","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"oci-image","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootful","installer":"rpm","family":"features","package":"oci-image","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootless","installer":"rpm","family":"features","package":"oci-image","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"host-gateway","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootful","installer":"rpm","family":"features","package":"host-gateway","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootless","installer":"rpm","family":"features","package":"host-gateway","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-k3s","installer":"k3s","family":"features","package":"host-gateway","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-k3s","installer":"k3s-ha","family":"features","package":"host-gateway","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"routable-host-ip","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootful","installer":"rpm","family":"features","package":"routable-host-ip","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-k3s","installer":"k3s","family":"features","package":"routable-host-ip","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-k3s","installer":"k3s-ha","family":"features","package":"routable-host-ip","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-k3s-ipv6","installer":"k3s-ha","family":"features","package":"policy-dns-ipv6","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"connect-ssh-supervision","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-docker-rootful-middleware-http-hooks","installer":"deb","family":"features","package":"middleware-http-hooks","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"resource-limits","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootful","installer":"rpm","family":"features","package":"resource-limits","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootless","installer":"rpm","family":"features","package":"resource-limits","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"ocsf","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootful","installer":"rpm","family":"features","package":"ocsf","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootless","installer":"rpm","family":"features","package":"ocsf","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"transparent-tcp","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootful","installer":"rpm","family":"features","package":"transparent-tcp","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootless","installer":"rpm","family":"features","package":"transparent-tcp","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootless-otlp","installer":"rpm","family":"features","package":"otlp-relay","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"otlp-relay-inactive","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootless-spiffe","installer":"rpm","family":"features","package":"provider-token-exchange","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"service-exposure","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootful","installer":"rpm","family":"features","package":"service-exposure","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootless","installer":"rpm","family":"features","package":"service-exposure","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootful-keycloak","installer":"rpm","family":"features","package":"keycloak-provider-refresh","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootless-keycloak","installer":"rpm","family":"features","package":"keycloak-provider-refresh","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-docker-rootful","installer":"deb","family":"drivers/docker","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootful-userns-default","installer":"rpm","family":"drivers/podman","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootful-userns-auto","installer":"rpm","family":"drivers/podman","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootful-userns-keep-id","installer":"rpm","family":"drivers/podman","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootful-userns-private","installer":"rpm","family":"drivers/podman","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootless-userns-default","installer":"rpm","family":"drivers/podman","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootless-userns-auto","installer":"rpm","family":"drivers/podman","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootless-userns-keep-id","installer":"rpm","family":"drivers/podman","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootless-userns-private","installer":"rpm","family":"drivers/podman","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-docker-rootful","installer":"deb","family":"continuity","disruption":"gateway-restart","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"ubuntu-docker-rootful","installer":"deb-upgrade-source","family":"continuity","disruption":"upgrade","gateway":"openshell","runner":"ubuntu-24.04","upgrade_source":true,"upgrade_package":"deb"}, - {"environment":"fedora-podman-rootless","installer":"rpm-upgrade-source","family":"continuity","disruption":"upgrade","gateway":"openshell","runner":"ubuntu-24.04","upgrade_source":true,"upgrade_package":"rpm"}, - {"environment":"fedora-podman-rootful","installer":"rpm","family":"continuity","disruption":"gateway-restart","gateway":"openshell","runner":"ubuntu-24.04"}, - {"environment":"fedora-podman-rootful","installer":"rpm-upgrade-source","family":"continuity","disruption":"upgrade","gateway":"openshell","runner":"ubuntu-24.04","upgrade_source":true,"upgrade_package":"rpm"} + {"environment":"ubuntu-docker-rootful","installer":"deb","family":"conformance","package":"conformance","runner":"ubuntu-24.04","test_threads":4}, + {"environment":"ubuntu-docker-rootful","installer":"deb-external-docker-driver","family":"conformance","package":"conformance","runner":"ubuntu-24.04","external_driver":true,"test_threads":4}, + {"environment":"fedora-podman-rootful","installer":"rpm","family":"conformance","package":"conformance","runner":"ubuntu-24.04","test_threads":4}, + {"environment":"fedora-podman-rootless","installer":"rpm","family":"conformance","package":"conformance","runner":"ubuntu-24.04","test_threads":4}, + {"environment":"ubuntu-k3s","installer":"k3s","family":"conformance","package":"conformance","runner":"ubuntu-24.04","test_threads":4}, + {"environment":"ubuntu-k3s","installer":"k3s-ha","family":"conformance","package":"conformance","runner":"ubuntu-24.04","test_threads":4}, + {"environment":"ubuntu-docker-rootful-config-push","installer":"deb","family":"conformance","package":"conformance","runner":"ubuntu-24.04","test_threads":4}, + {"environment":"ubuntu-k3s-ipv6","installer":"k3s-ha","family":"conformance","package":"conformance","runner":"ubuntu-24.04","test_threads":4}, + {"environment":"ubuntu-docker-rootful-cdi","installer":"deb","family":"features","package":"cdi","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootful-cdi","installer":"rpm","family":"features","package":"cdi","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootless-cdi","installer":"rpm","family":"features","package":"cdi","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-docker-rootful-driver-config","installer":"deb","family":"features","package":"driver-config","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootful-driver-config","installer":"rpm","family":"features","package":"driver-config","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootless-driver-config","installer":"rpm","family":"features","package":"driver-config","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-docker-rootful-corporate-proxy","installer":"deb","family":"features","package":"corporate-proxy","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootful-corporate-proxy","installer":"rpm","family":"features","package":"corporate-proxy","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootless-corporate-proxy","installer":"rpm","family":"features","package":"corporate-proxy","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-docker-rootful-keycloak","installer":"deb","family":"features","package":"keycloak-provider-refresh","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"gateway-mtls","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-docker-rootful-oidc","installer":"deb","family":"features","package":"oidc-auth","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"oci-image","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootful","installer":"rpm","family":"features","package":"oci-image","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootless","installer":"rpm","family":"features","package":"oci-image","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"host-gateway","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootful","installer":"rpm","family":"features","package":"host-gateway","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootless","installer":"rpm","family":"features","package":"host-gateway","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-k3s","installer":"k3s","family":"features","package":"host-gateway","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-k3s","installer":"k3s-ha","family":"features","package":"host-gateway","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"routable-host-ip","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootful","installer":"rpm","family":"features","package":"routable-host-ip","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-k3s","installer":"k3s","family":"features","package":"routable-host-ip","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-k3s","installer":"k3s-ha","family":"features","package":"routable-host-ip","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-k3s-ipv6","installer":"k3s-ha","family":"features","package":"policy-dns-ipv6","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"connect-ssh-supervision","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-docker-rootful-middleware-http-hooks","installer":"deb","family":"features","package":"middleware-http-hooks","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"resource-limits","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootful","installer":"rpm","family":"features","package":"resource-limits","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootless","installer":"rpm","family":"features","package":"resource-limits","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"ocsf","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootful","installer":"rpm","family":"features","package":"ocsf","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootless","installer":"rpm","family":"features","package":"ocsf","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"transparent-tcp","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootful","installer":"rpm","family":"features","package":"transparent-tcp","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootless","installer":"rpm","family":"features","package":"transparent-tcp","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootless-otlp","installer":"rpm","family":"features","package":"otlp-relay","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"otlp-relay-inactive","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootless-spiffe","installer":"rpm","family":"features","package":"provider-token-exchange","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-docker-rootful","installer":"deb","family":"features","package":"service-exposure","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootful","installer":"rpm","family":"features","package":"service-exposure","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootless","installer":"rpm","family":"features","package":"service-exposure","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootful-keycloak","installer":"rpm","family":"features","package":"keycloak-provider-refresh","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootless-keycloak","installer":"rpm","family":"features","package":"keycloak-provider-refresh","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-docker-rootful","installer":"deb","family":"drivers/docker","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootful-userns-default","installer":"rpm","family":"drivers/podman","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootful-userns-auto","installer":"rpm","family":"drivers/podman","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootful-userns-keep-id","installer":"rpm","family":"drivers/podman","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootful-userns-private","installer":"rpm","family":"drivers/podman","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootless-userns-default","installer":"rpm","family":"drivers/podman","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootless-userns-auto","installer":"rpm","family":"drivers/podman","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootless-userns-keep-id","installer":"rpm","family":"drivers/podman","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootless-userns-private","installer":"rpm","family":"drivers/podman","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-docker-rootful","installer":"deb","family":"continuity","disruption":"gateway-restart","runner":"ubuntu-24.04"}, + {"environment":"ubuntu-docker-rootful","installer":"deb-upgrade-source","family":"continuity","disruption":"upgrade","runner":"ubuntu-24.04","upgrade_source":true,"upgrade_package":"deb"}, + {"environment":"fedora-podman-rootless","installer":"rpm-upgrade-source","family":"continuity","disruption":"upgrade","runner":"ubuntu-24.04","upgrade_source":true,"upgrade_package":"rpm"}, + {"environment":"fedora-podman-rootful","installer":"rpm","family":"continuity","disruption":"gateway-restart","runner":"ubuntu-24.04"}, + {"environment":"fedora-podman-rootful","installer":"rpm-upgrade-source","family":"continuity","disruption":"upgrade","runner":"ubuntu-24.04","upgrade_source":true,"upgrade_package":"rpm"} ]' # `suite` names the row's tests in the job and artifact names. matrix=$(jq -c --arg family "${FAMILY}" --arg external "${EXTERNAL_DRIVERS}" --arg upgrade "${UPGRADE_SOURCE}" '{include: map( @@ -327,12 +327,15 @@ jobs: if [ -n "${DISRUPTION}" ]; then selection+=(--disruption "${DISRUPTION}") fi + # A row that omits `gateway` keeps the runner's default, `openshell`. + if [ -n "${GATEWAY}" ]; then + selection+=(--gateway "${GATEWAY}") + fi nix run .#openshell-test-runner -- run \ --environment "${ENVIRONMENT}" \ --installer "${INSTALLER}" \ --family "${FAMILY}" \ "${selection[@]}" \ - --gateway "${GATEWAY}" \ --results artifacts/test-results # The results directory holds the JUnit report (junit.xml), the nextest From cb3454bd997be0b03f9e490f3fd6e2454e892d73 Mon Sep 17 00:00:00 2001 From: Matthew Grossman Date: Fri, 4 Dec 2026 15:33:07 -0800 Subject: [PATCH 3/4] refactor(e2e): default the test client gateway to openshell Default openshell_client_gateway_name to openshell and drop the overrides that repeated it. The binaries installer's gateway.yaml keeps tmachine explicitly. The k3s-ha playbook takes the name from one play var, and the workflow loses its unused gateway override. Signed-off-by: Matthew Grossman --- .github/workflows/e2e-suites.yml | 16 ++++------------ tests/tmachine/ansible/playbooks/gateway.yaml | 4 ++++ .../ansible/playbooks/openshell-k3s-ha.yaml | 9 +++++---- .../ansible/playbooks/openshell-k3s.yaml | 1 - .../roles/openshell_client/tasks/main.yaml | 2 +- .../openshell_packaged_gateway/tasks/main.yaml | 1 - 6 files changed, 14 insertions(+), 19 deletions(-) diff --git a/.github/workflows/e2e-suites.yml b/.github/workflows/e2e-suites.yml index 81698048e2..789dbf700e 100644 --- a/.github/workflows/e2e-suites.yml +++ b/.github/workflows/e2e-suites.yml @@ -4,10 +4,9 @@ # Runs testkit suites in tmachine environments on CI. Each row of `ROWS` below # names a tmachine environment and installer, the family (the path of a # workspace under tests/suites/, such as conformance or drivers/podman) and, -# optionally, the package in it, the gateway name the installer registers, and -# the runner label for the environment's architecture. `openshell-test-runner` -# builds the tests, boots the environment, runs them inside it and checks the -# results. With `prebuilt`, the rows run what the caller built once for the +# optionally, the package in it and the runner label for the environment's +# architecture. `openshell-test-runner` builds the tests, boots the environment, +# runs them inside it and checks the results. With `prebuilt`, the rows run what the caller built once for the # run instead: conformance rows the static `openshell-conformance`, the other # rows their family's test bundle. The `family` input selects the rows of one # family, including the workspaces under it (drivers selects drivers/docker @@ -87,9 +86,7 @@ jobs: run: | set -euo pipefail # Only amd64 for now: CI has no arm64 runner with KVM for tmachine, - # and the caller only builds amd64 inputs. A row may set `gateway` - # to the name its installer registers with the CLI; the default is - # `openshell`, which every installer a row uses registers. A row without a + # and the caller only builds amd64 inputs. A row without a # package runs every package in the workspace; each driver suite is a # workspace of its own. rows='[ @@ -287,7 +284,6 @@ jobs: INSTALLER: ${{ matrix.installer }} FAMILY: ${{ matrix.family }} PACKAGE: ${{ matrix.package }} - GATEWAY: ${{ matrix.gateway }} DISRUPTION: ${{ matrix.disruption }} TEST_THREADS: ${{ matrix.test_threads }} run: | @@ -327,10 +323,6 @@ jobs: if [ -n "${DISRUPTION}" ]; then selection+=(--disruption "${DISRUPTION}") fi - # A row that omits `gateway` keeps the runner's default, `openshell`. - if [ -n "${GATEWAY}" ]; then - selection+=(--gateway "${GATEWAY}") - fi nix run .#openshell-test-runner -- run \ --environment "${ENVIRONMENT}" \ --installer "${INSTALLER}" \ diff --git a/tests/tmachine/ansible/playbooks/gateway.yaml b/tests/tmachine/ansible/playbooks/gateway.yaml index 11fd7be882..c6bf5c103e 100644 --- a/tests/tmachine/ansible/playbooks/gateway.yaml +++ b/tests/tmachine/ansible/playbooks/gateway.yaml @@ -5,6 +5,10 @@ - name: Configure OpenShell gateway hosts: all gather_facts: false + vars: + # The binaries installer's gateway keeps its own name; the role defaults to + # `openshell`. + openshell_client_gateway_name: tmachine roles: - openshell_gateway - openshell_client diff --git a/tests/tmachine/ansible/playbooks/openshell-k3s-ha.yaml b/tests/tmachine/ansible/playbooks/openshell-k3s-ha.yaml index 138fd80aac..9672cfbbdb 100644 --- a/tests/tmachine/ansible/playbooks/openshell-k3s-ha.yaml +++ b/tests/tmachine/ansible/playbooks/openshell-k3s-ha.yaml @@ -57,6 +57,8 @@ hosts: all become: true gather_facts: false + vars: + openshell_client_gateway_name: openshell tasks: # The chart's server certificate covers the Service DNS name but not its # ClusterIP, and the node resolver cannot reach cluster DNS. @@ -75,7 +77,7 @@ - name: Create guest mTLS directory ansible.builtin.file: - path: /home/tmachine/.config/openshell/gateways/openshell/mtls + path: "/home/tmachine/.config/openshell/gateways/{{ openshell_client_gateway_name }}/mtls" state: directory owner: tmachine group: tmachine @@ -84,7 +86,7 @@ - name: Write guest client TLS bundle ansible.builtin.copy: content: "{{ (k3s_client_tls.stdout | from_json).data[item] | b64decode }}" - dest: "/home/tmachine/.config/openshell/gateways/openshell/mtls/{{ item }}" + dest: "/home/tmachine/.config/openshell/gateways/{{ openshell_client_gateway_name }}/mtls/{{ item }}" owner: tmachine group: tmachine mode: "0600" @@ -95,7 +97,7 @@ - name: Remove baseline guest gateway registration become: false ansible.builtin.command: - argv: [/usr/local/bin/openshell, gateway, remove, openshell] + argv: [/usr/local/bin/openshell, gateway, remove, "{{ openshell_client_gateway_name }}"] - name: Register guest gateway ansible.builtin.include_role: @@ -104,4 +106,3 @@ become: false vars: openshell_client_gateway_endpoint: "https://openshell.openshell.svc.cluster.local:{{ k3s_gateway_port }}" - openshell_client_gateway_name: openshell diff --git a/tests/tmachine/ansible/playbooks/openshell-k3s.yaml b/tests/tmachine/ansible/playbooks/openshell-k3s.yaml index 210cfe5b40..7a1fab8ed1 100644 --- a/tests/tmachine/ansible/playbooks/openshell-k3s.yaml +++ b/tests/tmachine/ansible/playbooks/openshell-k3s.yaml @@ -234,6 +234,5 @@ gather_facts: false vars: openshell_client_gateway_endpoint: "http://{{ k3s_gateway_authority }}" - openshell_client_gateway_name: openshell roles: - openshell_client diff --git a/tests/tmachine/ansible/roles/openshell_client/tasks/main.yaml b/tests/tmachine/ansible/roles/openshell_client/tasks/main.yaml index 6586f23ac2..a33cd86b45 100644 --- a/tests/tmachine/ansible/roles/openshell_client/tasks/main.yaml +++ b/tests/tmachine/ansible/roles/openshell_client/tasks/main.yaml @@ -11,4 +11,4 @@ - "{{ openshell_client_gateway_endpoint | default('http://127.0.0.1:17670') }}" - --local - --name - - "{{ openshell_client_gateway_name | default('tmachine') }}" + - "{{ openshell_client_gateway_name | default('openshell') }}" diff --git a/tests/tmachine/ansible/roles/openshell_packaged_gateway/tasks/main.yaml b/tests/tmachine/ansible/roles/openshell_packaged_gateway/tasks/main.yaml index 6d818d969b..319782f146 100644 --- a/tests/tmachine/ansible/roles/openshell_packaged_gateway/tasks/main.yaml +++ b/tests/tmachine/ansible/roles/openshell_packaged_gateway/tasks/main.yaml @@ -149,4 +149,3 @@ name: openshell_client vars: openshell_client_gateway_endpoint: https://127.0.0.1:17670 - openshell_client_gateway_name: openshell From 0356f1a1ebee894ea9baf472771a9a125ba2246e Mon Sep 17 00:00:00 2001 From: Matthew Grossman Date: Fri, 4 Dec 2026 15:44:59 -0800 Subject: [PATCH 4/4] refactor(e2e): register the binaries installer gateway as openshell Every installer now registers the gateway openshell, so the test client role needs no per-installer name. The binaries gateway config uses the server defaults for its id, network and sandbox label, and the Podman E2E playbook no longer branches on the installer or re-registers the gateway. Signed-off-by: Matthew Grossman --- .../ansible/playbooks/drivers/podman/e2e.yaml | 22 +++++-------------- tests/tmachine/ansible/playbooks/gateway.yaml | 4 ---- .../templates/gateway-docker.toml.j2 | 2 +- .../templates/gateway-podman.toml.j2 | 2 +- .../templates/gateway.toml.j2 | 2 +- 5 files changed, 8 insertions(+), 24 deletions(-) diff --git a/tests/tmachine/ansible/playbooks/drivers/podman/e2e.yaml b/tests/tmachine/ansible/playbooks/drivers/podman/e2e.yaml index a9270a0922..d517859b6b 100644 --- a/tests/tmachine/ansible/playbooks/drivers/podman/e2e.yaml +++ b/tests/tmachine/ansible/playbooks/drivers/podman/e2e.yaml @@ -48,10 +48,10 @@ HOME: /home/tmachine XDG_RUNTIME_DIR: /run/user/1000 - # The binaries installer runs a plain-HTTP gateway named tmachine from a - # system service and puts the CLI in /usr/local/bin. The package installers - # run the packaged user service, install the CLI in /usr/bin and register - # the gateway as openshell, using the package default network and namespace. + # The binaries installer runs a plain-HTTP gateway from a system service + # and puts the CLI in /usr/local/bin. The package installers run the + # packaged user service and install the CLI in /usr/bin. Both register the + # gateway as openshell, using the default network and namespace. - name: Detect the installer ansible.builtin.stat: path: /usr/local/bin/openshell @@ -61,19 +61,7 @@ ansible.builtin.set_fact: podman_e2e_binaries: "{{ podman_e2e_binaries_cli.stat.exists }}" podman_e2e_cli: "{{ '/usr/local/bin/openshell' if podman_e2e_binaries_cli.stat.exists else '/usr/bin/openshell' }}" - podman_e2e_gateway: "{{ 'tmachine' if podman_e2e_binaries_cli.stat.exists else 'openshell' }}" - - - name: Remove any previous OpenShell gateway registration - when: podman_e2e_binaries - ansible.builtin.command: - argv: [/usr/local/bin/openshell, gateway, remove, tmachine] - changed_when: false - failed_when: false - - - name: Register the configured OpenShell gateway - when: podman_e2e_binaries - ansible.builtin.command: - argv: [/usr/local/bin/openshell, gateway, add, http://127.0.0.1:17670, --local, --name, tmachine] + podman_e2e_gateway: openshell - name: Run Podman E2E archive tests ansible.builtin.command: diff --git a/tests/tmachine/ansible/playbooks/gateway.yaml b/tests/tmachine/ansible/playbooks/gateway.yaml index c6bf5c103e..11fd7be882 100644 --- a/tests/tmachine/ansible/playbooks/gateway.yaml +++ b/tests/tmachine/ansible/playbooks/gateway.yaml @@ -5,10 +5,6 @@ - name: Configure OpenShell gateway hosts: all gather_facts: false - vars: - # The binaries installer's gateway keeps its own name; the role defaults to - # `openshell`. - openshell_client_gateway_name: tmachine roles: - openshell_gateway - openshell_client diff --git a/tests/tmachine/ansible/roles/openshell_gateway/templates/gateway-docker.toml.j2 b/tests/tmachine/ansible/roles/openshell_gateway/templates/gateway-docker.toml.j2 index ad55559dc2..d7f3fc739a 100644 --- a/tests/tmachine/ansible/roles/openshell_gateway/templates/gateway-docker.toml.j2 +++ b/tests/tmachine/ansible/roles/openshell_gateway/templates/gateway-docker.toml.j2 @@ -5,6 +5,6 @@ [openshell.drivers.docker] socket_path = "{{ openshell_runtime_socket }}" image_pull_policy = "if_not_present" -sandbox_label = "tmachine" +sandbox_label = "openshell" grpc_endpoint = "http://127.0.0.1:17670" {% endblock %} diff --git a/tests/tmachine/ansible/roles/openshell_gateway/templates/gateway-podman.toml.j2 b/tests/tmachine/ansible/roles/openshell_gateway/templates/gateway-podman.toml.j2 index e59314f632..8dd0a2b73a 100644 --- a/tests/tmachine/ansible/roles/openshell_gateway/templates/gateway-podman.toml.j2 +++ b/tests/tmachine/ansible/roles/openshell_gateway/templates/gateway-podman.toml.j2 @@ -5,7 +5,7 @@ [openshell.drivers.podman] socket_path = "{{ openshell_runtime_socket }}" image_pull_policy = "if_not_present" -network_name = "tmachine" +network_name = "openshell" health_check_interval_secs = 10 stop_timeout_secs = 15 {% endblock %} diff --git a/tests/tmachine/ansible/roles/openshell_gateway/templates/gateway.toml.j2 b/tests/tmachine/ansible/roles/openshell_gateway/templates/gateway.toml.j2 index 6536d99f11..ef4669cf3b 100644 --- a/tests/tmachine/ansible/roles/openshell_gateway/templates/gateway.toml.j2 +++ b/tests/tmachine/ansible/roles/openshell_gateway/templates/gateway.toml.j2 @@ -17,6 +17,6 @@ allow_unauthenticated_users = true signing_key_path = "/var/lib/openshell/pki/jwt/signing.pem" public_key_path = "/var/lib/openshell/pki/jwt/public.pem" kid_path = "/var/lib/openshell/pki/jwt/kid" -gateway_id = "tmachine" +gateway_id = "openshell" {% block driver %}{% endblock %}