Skip to content

Commit d8188e9

Browse files
NO-JIRA: ci(runners): add network-exercising build test for podman DNS diagnostics
Add Containerfile.test-network with RUN steps that require DNS (microdnf install, urllib HTTPS request) to verify that glibc-based network operations work inside podman build --network=host even when Go-level podman pull fails on s390x. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent a903b56 commit d8188e9

2 files changed

Lines changed: 27 additions & 1 deletion

File tree

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

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ jobs:
2626
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2727
with:
2828
persist-credentials: false
29-
sparse-checkout: ci/cached-builds/Containerfile.test
29+
sparse-checkout: |
30+
ci/cached-builds/Containerfile.test
31+
ci/cached-builds/Containerfile.test-network
3032
3133
- name: "Diagnose: resolv.conf BEFORE and AFTER podman install"
3234
if: ${{ !cancelled() }}
@@ -126,6 +128,26 @@ jobs:
126128
podman build --pull=never --network=host -t test-loaded -f /tmp/Containerfile.test /tmp/ && echo "BUILD FROM LOADED: OK" || echo "BUILD FROM LOADED: FAILED"
127129
'
128130
131+
- name: "Test: docker pull + podman load + network-exercising build"
132+
if: ${{ !cancelled() }}
133+
run: |
134+
set -x
135+
# Pre-pull base image via Docker (works on both arches)
136+
sudo docker pull quay.io/centos/centos:stream9-minimal
137+
sudo docker save quay.io/centos/centos:stream9-minimal -o /tmp/base-image.tar
138+
sudo docker run --rm --privileged --network=host \
139+
-v ${{ github.workspace }}/ci/cached-builds/Containerfile.test-network:/tmp/Containerfile.test-network:ro \
140+
-v /tmp/base-image.tar:/tmp/base-image.tar:ro \
141+
registry.fedoraproject.org/fedora:44 \
142+
bash -c '
143+
dnf install -y --quiet podman
144+
podman load < /tmp/base-image.tar
145+
echo "=== build with RUN steps that need network (dnf, urllib) ==="
146+
podman build --pull=never --network=host \
147+
-t test-network -f /tmp/Containerfile.test-network /tmp/ \
148+
&& echo "NETWORK BUILD: OK" || echo "NETWORK BUILD: FAILED"
149+
'
150+
129151
- name: "Diagnose: namespace and socket deep dive"
130152
if: ${{ !cancelled() }}
131153
run: |
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM quay.io/centos/centos:stream9-minimal
2+
RUN microdnf install -y --nodocs --setopt=install_weak_deps=0 python3 && microdnf clean all
3+
RUN python3 -c "import urllib.request; r = urllib.request.urlopen('https://pypi.org/simple/pip/'); print(f'PyPI reachable: {r.status}')"
4+
RUN echo "network-exercising build complete on $(uname -m)"

0 commit comments

Comments
 (0)