Skip to content

Commit 697565e

Browse files
committed
test(podman): install script and capture network diagnostics in the e2e probe
Diagnostic only, not for merge. Installs util-linux-script so the PTY-backed sandbox_lifecycle tests can run in the guest, and captures Podman and guest network state when the archive fails, to explain the proxy_egress_pipeline IP-literal timeouts and the transparent_tcp policy DNS failure. Part of #3712. Signed-off-by: politerealism <[email protected]>
1 parent b5d843d commit 697565e

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

  • tests/ansible/playbooks/drivers/podman

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

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@
5858
ansible.builtin.command:
5959
argv: [/usr/local/bin/openshell, gateway, add, http://127.0.0.1:17670, --local, --name, tmachine]
6060

61+
# DIAGNOSTIC PROBE, NOT FOR MERGE (#3712): `script` backs the PTY helper
62+
# used by the sandbox_lifecycle tests.
63+
- name: Install guest tools used by the E2E archive
64+
become: true
65+
ansible.builtin.dnf:
66+
name: util-linux-script
67+
state: present
68+
6169
- name: Run Podman E2E archive tests
6270
ansible.builtin.command:
6371
argv:
@@ -109,6 +117,53 @@
109117
var: podman_e2e_gateway_journal.stdout_lines
110118
when: podman_e2e_test_result.rc != 0
111119

120+
# DIAGNOSTIC PROBE, NOT FOR MERGE (#3712): evidence for the IP-literal
121+
# timeouts in proxy_egress_pipeline and the policy DNS failure in
122+
# transparent_tcp.
123+
- name: Capture Podman network diagnostics after Podman E2E test failure
124+
ansible.builtin.shell: |
125+
echo "== podman network inspect tmachine"
126+
podman network inspect tmachine
127+
echo "== podman ps -a"
128+
podman ps -a
129+
args:
130+
executable: /bin/bash
131+
environment:
132+
HOME: /home/tmachine
133+
XDG_RUNTIME_DIR: /run/user/1000
134+
changed_when: false
135+
failed_when: false
136+
when: podman_e2e_test_result.rc != 0
137+
register: podman_e2e_podman_diagnostics
138+
139+
- name: Capture guest network diagnostics after Podman E2E test failure
140+
become: true
141+
ansible.builtin.shell: |
142+
echo "== ip -brief addr"
143+
ip -brief addr
144+
echo "== ip route"
145+
ip route
146+
echo "== getenforce"
147+
getenforce
148+
echo "== nft ruleset (first 80 lines)"
149+
nft list ruleset 2>&1 | head -80
150+
args:
151+
executable: /bin/bash
152+
changed_when: false
153+
failed_when: false
154+
when: podman_e2e_test_result.rc != 0
155+
register: podman_e2e_guest_diagnostics
156+
157+
- name: Show Podman network diagnostics after Podman E2E test failure
158+
ansible.builtin.debug:
159+
var: podman_e2e_podman_diagnostics.stdout_lines
160+
when: podman_e2e_test_result.rc != 0
161+
162+
- name: Show guest network diagnostics after Podman E2E test failure
163+
ansible.builtin.debug:
164+
var: podman_e2e_guest_diagnostics.stdout_lines
165+
when: podman_e2e_test_result.rc != 0
166+
112167
- name: Require Podman E2E archive success
113168
ansible.builtin.assert:
114169
that: [podman_e2e_test_result.rc == 0]

0 commit comments

Comments
 (0)