Skip to content

Commit 3950da8

Browse files
NO-JIRA: ci(runners): add deep diagnostic tests for s390x podman DNS mystery
New tests to isolate the exact failure mechanism: - podman --log-level=trace pull: detect if MaybeReexecUsingUserNamespace fires - strace podman pull: capture clone/unshare/setns syscalls and failed sockets - skopeo inspect: same containers/image library, different binary (no storage) - buildah pull/bud directly: test without podman wrapper - Go DNS binary: test if a plain Go binary can resolve DNS (Go runtime vs podman) Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 51f5c97 commit 3950da8

2 files changed

Lines changed: 101 additions & 0 deletions

File tree

.github/workflows/test-ibm-podman-dns.yaml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
sparse-checkout: |
3030
ci/cached-builds/Containerfile.test
3131
ci/cached-builds/Containerfile.test-network
32+
ci/cached-builds/dnstest.go
3233
3334
- name: "Diagnose: resolv.conf BEFORE and AFTER podman install"
3435
if: ${{ !cancelled() }}
@@ -230,6 +231,90 @@ jobs:
230231
&& echo "DNS in user+mount ns: OK" || echo "DNS in user+mount ns: BLOCKED"
231232
'
232233
234+
- name: "Diagnose: podman --log-level=trace pull (re-exec detection)"
235+
if: ${{ !cancelled() }}
236+
run: |
237+
set -x
238+
sudo docker run --rm --privileged --network=host \
239+
registry.fedoraproject.org/fedora:44 \
240+
bash -c '
241+
dnf install -y --quiet podman
242+
echo "=== podman version (skips MaybeReexec in buildah) ==="
243+
podman version 2>&1 | head -5
244+
echo "=== podman info (does it work at all?) ==="
245+
podman info --format "{{.Host.Security.Rootless}} / {{.Store.GraphDriverName}}" 2>&1
246+
echo "=== podman --log-level=trace pull (watch for re-exec) ==="
247+
podman --log-level=trace pull quay.io/centos/centos:stream9-minimal 2>&1 | head -80
248+
echo "=== exit code: $? ==="
249+
'
250+
251+
- name: "Diagnose: strace podman pull (syscall-level namespace creation)"
252+
if: ${{ !cancelled() }}
253+
run: |
254+
set -x
255+
sudo docker run --rm --privileged --network=host \
256+
registry.fedoraproject.org/fedora:44 \
257+
bash -c '
258+
dnf install -y --quiet podman strace
259+
echo "=== strace: look for clone/unshare/setns syscalls ==="
260+
strace -f -e trace=clone,clone3,unshare,setns,socket -o /tmp/strace.log \
261+
podman pull quay.io/centos/centos:stream9-minimal 2>&1 || true
262+
echo "=== clone/unshare/setns calls ==="
263+
grep -c "clone\|unshare\|setns" /tmp/strace.log || echo "none found"
264+
grep "unshare\|setns\|CLONE_NEWUSER\|CLONE_NEWNET\|CLONE_NEWNS" /tmp/strace.log | head -20
265+
echo "=== socket calls that failed ==="
266+
grep "socket.*= -1" /tmp/strace.log | head -10
267+
echo "=== first DNS-related socket call ==="
268+
grep "socket(AF_INET\|AF_INET6" /tmp/strace.log | head -5
269+
'
270+
271+
- name: "Test: skopeo copy (same containers/image library, different binary)"
272+
if: ${{ !cancelled() }}
273+
run: |
274+
set -x
275+
sudo docker run --rm --privileged --network=host \
276+
registry.fedoraproject.org/fedora:44 \
277+
bash -c '
278+
dnf install -y --quiet skopeo
279+
echo "=== skopeo inspect (uses containers/image, no storage) ==="
280+
skopeo inspect docker://quay.io/centos/centos:stream9-minimal 2>&1 | head -5 \
281+
&& echo "SKOPEO INSPECT: OK" || echo "SKOPEO INSPECT: FAILED"
282+
'
283+
284+
- name: "Test: buildah directly (not through podman)"
285+
if: ${{ !cancelled() }}
286+
run: |
287+
set -x
288+
sudo docker run --rm --privileged --network=host \
289+
-v ${{ github.workspace }}/ci/cached-builds/Containerfile.test:/tmp/Containerfile.test:ro \
290+
registry.fedoraproject.org/fedora:44 \
291+
bash -c '
292+
dnf install -y --quiet buildah
293+
echo "=== buildah version ==="
294+
buildah version
295+
echo "=== buildah pull ==="
296+
buildah pull quay.io/centos/centos:stream9-minimal 2>&1 \
297+
&& echo "BUILDAH PULL: OK" || echo "BUILDAH PULL: FAILED"
298+
echo "=== buildah bud --isolation=chroot --network=host ==="
299+
buildah bud --isolation=chroot --network=host \
300+
-t test-buildah -f /tmp/Containerfile.test /tmp/ 2>&1 \
301+
&& echo "BUILDAH BUD: OK" || echo "BUILDAH BUD: FAILED"
302+
'
303+
304+
- name: "Test: Go binary DNS (is it Go runtime or podman-specific?)"
305+
if: ${{ !cancelled() }}
306+
run: |
307+
set -x
308+
sudo docker run --rm --privileged --network=host \
309+
-v ${{ github.workspace }}/ci/cached-builds/dnstest.go:/tmp/dnstest.go:ro \
310+
registry.fedoraproject.org/fedora:44 \
311+
bash -c '
312+
dnf install -y --quiet golang
313+
echo "=== compile and run a simple Go DNS lookup ==="
314+
cd /tmp && go build -o dnstest dnstest.go && ./dnstest \
315+
&& echo "GO DNS: OK" || echo "GO DNS: FAILED"
316+
'
317+
233318
- name: "Diagnose: namespace and socket deep dive"
234319
if: ${{ !cancelled() }}
235320
run: |

ci/cached-builds/dnstest.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package main
2+
3+
import (
4+
"fmt"
5+
"net"
6+
"os"
7+
)
8+
9+
func main() {
10+
addrs, err := net.LookupHost("quay.io")
11+
if err != nil {
12+
fmt.Fprintf(os.Stderr, "Go DNS lookup failed: %v\n", err)
13+
os.Exit(1)
14+
}
15+
fmt.Printf("Go DNS lookup OK: %v\n", addrs)
16+
}

0 commit comments

Comments
 (0)