Skip to content

Commit ba76704

Browse files
authored
revert(tmachine): revert package-installed Podman driver suites (#4206)
Revert PR #4107 and restore binary installers for the Podman driver qualification lanes. This reverts commit 8990656. Signed-off-by: Simon Scatton <sscatton@nvidia.com>
1 parent 13c248f commit ba76704

13 files changed

Lines changed: 79 additions & 216 deletions

File tree

‎.github/workflows/branch-e2e.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,9 @@ jobs:
305305
integration-inputs-artifact-id: ${{ needs.prepare-integration.outputs.integration_inputs_artifact_id }}
306306
test-matrix: >-
307307
[
308-
{"environment":"fedora-podman-rootful","installer":"rpm","testsuite":"driver-podman"},
309-
{"environment":"fedora-podman-rootless","installer":"rpm","testsuite":"e2e-podman"},
310-
{"environment":"fedora-podman-rootless","installer":"rpm","testsuite":"driver-podman"}
308+
{"environment":"fedora-podman-rootful","installer":"binaries","testsuite":"driver-podman"},
309+
{"environment":"fedora-podman-rootless","installer":"binaries","testsuite":"e2e-podman"},
310+
{"environment":"fedora-podman-rootless","installer":"binaries","testsuite":"driver-podman"}
311311
]
312312
313313
docker-e2e:

‎CI.md‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,9 @@ runs without optional E2E labels. Core integration qualification builds and inst
7777
the DEB on Ubuntu with Docker and installs the CLI and gateway RPMs on Fedora with
7878
rootful and rootless Podman. These lanes run conformance using the matching runtime
7979
images. Release Dev and Release Tag use the same package installers.
80-
Fedora provider-refresh tests also use RPMs. The Podman driver-specific branch
81-
lanes use RPMs for rootful and rootless user-namespace comparisons and rootless
82-
Podman E2E. Their fixtures use the installed gateway's registration, active
83-
configuration, and service context. The manual Integration Tests workflow defaults
80+
Fedora provider-refresh tests also use RPMs. The Podman driver-specific suites
81+
retain the binary installer because their fixtures configure its system service,
82+
local HTTP gateway, and CLI path. The manual Integration Tests workflow defaults
8483
to the package installers and downloads the packages selected by its matrix.
8584

8685
Three opt-in labels enable the long-running E2E suites:

‎TESTING.md‎

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -290,27 +290,10 @@ Run the portable subset in a disposable rootless Podman guest:
290290

291291
```shell
292292
nix run .#build-artifacts
293-
nix run .#tmachine -- test fedora-podman-rootless rpm e2e-podman
294-
nix run .#tmachine -- test fedora-podman-rootless rpm driver-podman
293+
nix run .#tmachine -- test fedora-podman-rootless binaries e2e-podman
294+
nix run .#tmachine -- test fedora-podman-rootless binaries driver-podman
295295
```
296296

297-
The driver suites also support the `binaries` installer. The shared installer
298-
roles save the active gateway configuration, registration name, service scope,
299-
service owner, and network name in `/var/lib/openshell-test/gateway.yaml`.
300-
Suites resolve `openshell` from PATH and use that registration, including the
301-
packaged gateway's HTTPS client credentials. Namespace fixtures modify the
302-
active qualification configuration and restart its system or user service.
303-
Failure diagnostics select the matching journal unit and user ID. Missing
304-
metadata or credentials fail the run; suites do not replace package setup with
305-
an HTTP gateway. Ansible sources participate in tmachine's installation cache
306-
hash, so older cached installations are rebuilt with this metadata.
307-
308-
The `driver-podman` suite supports rootful and rootless Podman. The
309-
`e2e-podman` archive requires rootless Podman for its host workload fixtures.
310-
DEB and RPM installers share the gateway role; available environments pair
311-
DEB with Ubuntu/Docker and RPM with Fedora/Podman. A DEB/Podman run requires an
312-
Ubuntu Podman environment.
313-
314297
Print the exact tmachine archive selection as a shell `PODMAN_CI_TESTS` array:
315298

316299
```shell

‎tests/ansible/playbooks/drivers/podman/default-userns-baseline.yaml‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
- name: Wait for SSH
1313
ansible.builtin.wait_for_connection:
1414

15-
- name: Resolve installed gateway context
16-
ansible.builtin.include_role:
17-
name: openshell_test_gateway
18-
1915
- name: Detect tmachine container runtime
2016
ansible.builtin.include_role:
2117
name: tmachine_container_runtime
@@ -42,7 +38,7 @@
4238
- name: Read OpenShell gateway configuration
4339
become: true
4440
ansible.builtin.slurp:
45-
src: "{{ openshell_test_gateway.config_path }}"
41+
src: /etc/openshell/gateway.toml
4642
register: openshell_gateway_config
4743

4844
- name: Require unconfigured Podman user namespaces

‎tests/ansible/playbooks/drivers/podman/e2e.yaml‎

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,6 @@
1111
- name: Wait for SSH
1212
ansible.builtin.wait_for_connection:
1313

14-
- name: Resolve installed gateway context
15-
ansible.builtin.include_role:
16-
name: openshell_test_gateway
17-
18-
- name: Detect tmachine container runtime
19-
ansible.builtin.include_role:
20-
name: tmachine_container_runtime
21-
22-
- name: Require rootless Podman for the E2E workload fixtures
23-
ansible.builtin.assert:
24-
that:
25-
- tmachine_container_runtime_name == 'podman'
26-
- tmachine_container_runtime_is_rootless
27-
fail_msg: The Podman E2E archive requires the rootless Podman environment
28-
2914
- name: Create Podman E2E test directory
3015
become: true
3116
ansible.builtin.file:
@@ -61,7 +46,17 @@
6146
- "{{ podman_e2e_test_root }}/openshell-e2e-python-dev.tar"
6247
environment:
6348
HOME: /home/tmachine
64-
XDG_RUNTIME_DIR: "/run/user/{{ tmachine_container_runtime_tmachine_uid.stdout }}"
49+
XDG_RUNTIME_DIR: /run/user/1000
50+
51+
- name: Remove any previous OpenShell gateway registration
52+
ansible.builtin.command:
53+
argv: [/usr/local/bin/openshell, gateway, remove, tmachine]
54+
changed_when: false
55+
failed_when: false
56+
57+
- name: Register the configured OpenShell gateway
58+
ansible.builtin.command:
59+
argv: [/usr/local/bin/openshell, gateway, add, http://127.0.0.1:17670, --local, --name, tmachine]
6560

6661
- name: Run Podman E2E archive tests
6762
ansible.builtin.command:
@@ -78,16 +73,16 @@
7873
- --no-fail-fast
7974
environment:
8075
CONTAINER_ENGINE: podman
81-
CONTAINER_HOST: "unix://{{ tmachine_container_runtime_socket }}"
76+
CONTAINER_HOST: unix:///run/user/1000/podman/podman.sock
8277
HOME: /home/tmachine
83-
OPENSHELL_BIN: "{{ openshell_test_cli.stdout }}"
78+
OPENSHELL_BIN: /usr/local/bin/openshell
8479
OPENSHELL_E2E_CONTAINER_ENGINE_UNSET_XDG_CONFIG_HOME: "1"
8580
OPENSHELL_E2E_DRIVER: podman
86-
OPENSHELL_E2E_NETWORK_NAME: "{{ openshell_test_gateway.network_name }}"
81+
OPENSHELL_E2E_NETWORK_NAME: tmachine
8782
OPENSHELL_E2E_SANDBOX_NAMESPACE: tmachine
88-
OPENSHELL_GATEWAY: "{{ openshell_test_gateway.name }}"
89-
OPENSHELL_PODMAN_SOCKET: "{{ tmachine_container_runtime_socket }}"
90-
XDG_RUNTIME_DIR: "/run/user/{{ tmachine_container_runtime_tmachine_uid.stdout }}"
83+
OPENSHELL_GATEWAY: tmachine
84+
OPENSHELL_PODMAN_SOCKET: /run/user/1000/podman/podman.sock
85+
XDG_RUNTIME_DIR: /run/user/1000
9186
register: podman_e2e_test_result
9287
changed_when: false
9388
failed_when: false
@@ -100,10 +95,18 @@
10095
ansible.builtin.debug:
10196
var: podman_e2e_test_result.stdout_lines
10297

103-
- name: Collect installed gateway diagnostics after test failure
104-
ansible.builtin.include_role:
105-
name: openshell_test_gateway
106-
tasks_from: journal.yaml
98+
- name: Capture OpenShell gateway journal after Podman E2E test failure
99+
become: true
100+
ansible.builtin.command:
101+
argv: [journalctl, --unit, openshell-gateway.service, --no-pager, --lines, "200"]
102+
changed_when: false
103+
failed_when: false
104+
when: podman_e2e_test_result.rc != 0
105+
register: podman_e2e_gateway_journal
106+
107+
- name: Show OpenShell gateway journal after Podman E2E test failure
108+
ansible.builtin.debug:
109+
var: podman_e2e_gateway_journal.stdout_lines
107110
when: podman_e2e_test_result.rc != 0
108111

109112
- name: Require Podman E2E archive success

‎tests/ansible/playbooks/drivers/podman/tests.yaml‎

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
- name: Wait for SSH
1313
ansible.builtin.wait_for_connection:
1414

15-
- name: Resolve installed gateway context
16-
ansible.builtin.include_role:
17-
name: openshell_test_gateway
18-
1915
- name: Detect tmachine container runtime
2016
ansible.builtin.include_role:
2117
name: tmachine_container_runtime
@@ -43,12 +39,21 @@
4339
owner: tmachine
4440
group: tmachine
4541

42+
- name: Remove any previous OpenShell gateway registration
43+
ansible.builtin.command:
44+
argv: [/usr/local/bin/openshell, gateway, remove, tmachine]
45+
changed_when: false
46+
failed_when: false
47+
48+
- name: Register the configured OpenShell gateway
49+
ansible.builtin.command:
50+
argv: [/usr/local/bin/openshell, gateway, add, http://127.0.0.1:17670, --local, --name, tmachine]
51+
4652
- name: Run Podman archive tests
4753
ansible.builtin.command:
4854
argv: [cargo-nextest, nextest, run, --archive-file, "{{ podman_test_root }}/tests.tar.zst", --workspace-remap, "{{ podman_test_root }}", --no-capture]
4955
environment:
50-
OPENSHELL_GATEWAY: "{{ openshell_test_gateway.name }}"
51-
OPENSHELL_BIN: "{{ openshell_test_cli.stdout }}"
56+
OPENSHELL_BIN: /usr/local/bin/openshell
5257
OPENSHELL_TEST_INPUT_DIR: "{{ podman_test_input_dir }}"
5358
OPENSHELL_PODMAN_TEST_IMAGE: "{{ openshell_podman_test_image | default('') }}"
5459
register: podman_test_result
@@ -63,10 +68,24 @@
6368
ansible.builtin.debug:
6469
var: podman_test_result.stdout_lines
6570

66-
- name: Collect installed gateway diagnostics after test failure
67-
ansible.builtin.include_role:
68-
name: openshell_test_gateway
69-
tasks_from: journal.yaml
71+
- name: Capture OpenShell gateway journal after Podman test failure
72+
become: true
73+
ansible.builtin.command:
74+
argv:
75+
- journalctl
76+
- --unit
77+
- openshell-gateway.service
78+
- --no-pager
79+
- --lines
80+
- "200"
81+
changed_when: false
82+
failed_when: false
83+
when: podman_test_result.rc != 0
84+
register: podman_gateway_journal
85+
86+
- name: Show OpenShell gateway journal after Podman test failure
87+
ansible.builtin.debug:
88+
var: podman_gateway_journal.stdout_lines
7089
when: podman_test_result.rc != 0
7190

7291
- name: Discover Podman containers after test failure

‎tests/ansible/playbooks/drivers/podman/userns-profile.yaml‎

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
- name: Wait for SSH
1313
ansible.builtin.wait_for_connection:
1414

15-
- name: Resolve installed gateway context
16-
ansible.builtin.include_role:
17-
name: openshell_test_gateway
18-
1915
- name: Detect tmachine container runtime
2016
ansible.builtin.include_role:
2117
name: tmachine_container_runtime
@@ -42,15 +38,21 @@
4238
- name: Apply the Podman user-namespace fixture
4339
become: true
4440
ansible.builtin.blockinfile:
45-
path: "{{ openshell_test_gateway.config_path }}"
46-
insertafter: '^\[openshell\.drivers\.podman\]$'
41+
path: /etc/openshell/gateway.toml
4742
marker: "# {mark} OpenShell Podman userns test fixture"
4843
block: "{{ lookup('ansible.builtin.file', podman_userns_config) | trim }}"
4944

50-
- name: Restart installed gateway with the Podman user-namespace fixture
51-
ansible.builtin.include_role:
52-
name: openshell_test_gateway
53-
tasks_from: restart.yaml
45+
- name: Restart OpenShell gateway with the Podman user-namespace fixture
46+
become: true
47+
ansible.builtin.systemd_service:
48+
name: openshell-gateway.service
49+
state: restarted
50+
51+
- name: Wait for the configured OpenShell gateway
52+
ansible.builtin.wait_for:
53+
host: 127.0.0.1
54+
port: 17670
55+
timeout: 60
5456

5557
- name: Capture direct Podman user-namespace mapping
5658
become: true

‎tests/ansible/roles/openshell_client/tasks/main.yaml‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,3 @@
1212
- --local
1313
- --name
1414
- "{{ openshell_client_gateway_name | default('tmachine') }}"
15-
16-
- name: Publish test gateway context
17-
ansible.builtin.include_role:
18-
name: openshell_test_gateway
19-
tasks_from: publish.yaml
20-
vars:
21-
openshell_test_gateway_context:
22-
name: "{{ openshell_client_gateway_name | default('tmachine') }}"
23-
config_path: "{{ openshell_client_gateway_config_path | default('/etc/openshell/gateway.toml') }}"
24-
service_scope: "{{ openshell_client_gateway_service_scope | default('system') }}"
25-
service_user: "{{ openshell_gateway_user if openshell_client_gateway_service_scope | default('system') == 'user' else 'root' }}"
26-
service_home: "{{ openshell_gateway_home if openshell_client_gateway_service_scope | default('system') == 'user' else '/root' }}"
27-
service_uid: "{{ openshell_gateway_uid if openshell_client_gateway_service_scope | default('system') == 'user' else '0' }}"
28-
network_name: "{{ openshell_client_gateway_network_name | default('tmachine') }}"

‎tests/ansible/roles/openshell_packaged_gateway/tasks/main.yaml‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,3 @@
106106
vars:
107107
openshell_client_gateway_endpoint: https://127.0.0.1:17670
108108
openshell_client_gateway_name: openshell
109-
openshell_client_gateway_config_path: /var/lib/openshell-qualification/gateway.toml
110-
openshell_client_gateway_service_scope: user
111-
openshell_client_gateway_network_name: openshell

‎tests/ansible/roles/openshell_test_gateway/tasks/journal.yaml‎

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)