Skip to content

Commit b2e272c

Browse files
NO-JIRA: ci(runners): test chroot isolation and userns skip for s390x DNS fix
Three new tests for s390x podman DNS workarounds: 1. BUILDAH_ISOLATION=chroot + docker-pull/podman-load + network build (chroot skips user/net namespaces for RUN steps) 2. --userns=host --network=host with pre-loaded image (re-test with pull phase sidestepped) 3. _CONTAINERS_USERNS_CONFIGURED=1 env var on podman pull (may skip MaybeReexecUsingUserNamespace in containers/storage) Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent e794096 commit b2e272c

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

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

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,61 @@ jobs:
148148
&& echo "NETWORK BUILD: OK" || echo "NETWORK BUILD: FAILED"
149149
'
150150
151+
- name: "Test: docker pull + podman load + BUILDAH_ISOLATION=chroot + network build"
152+
if: ${{ !cancelled() }}
153+
run: |
154+
set -x
155+
sudo docker pull quay.io/centos/centos:stream9-minimal
156+
sudo docker save quay.io/centos/centos:stream9-minimal -o /tmp/base-image.tar
157+
sudo docker run --rm --privileged --network=host \
158+
-v ${{ github.workspace }}/ci/cached-builds/Containerfile.test-network:/tmp/Containerfile.test-network:ro \
159+
-v /tmp/base-image.tar:/tmp/base-image.tar:ro \
160+
-e BUILDAH_ISOLATION=chroot \
161+
registry.fedoraproject.org/fedora:44 \
162+
bash -c '
163+
dnf install -y --quiet podman
164+
podman load < /tmp/base-image.tar
165+
echo "=== BUILDAH_ISOLATION=$BUILDAH_ISOLATION ==="
166+
echo "=== chroot isolation skips user/net ns for RUN steps ==="
167+
podman build --pull=never --network=host \
168+
-t test-chroot-net -f /tmp/Containerfile.test-network /tmp/ \
169+
&& echo "CHROOT+NETWORK BUILD: OK" || echo "CHROOT+NETWORK BUILD: FAILED"
170+
'
171+
172+
- name: "Test: docker pull + podman load + --userns=host --network=host + network build"
173+
if: ${{ !cancelled() }}
174+
run: |
175+
set -x
176+
sudo docker pull quay.io/centos/centos:stream9-minimal
177+
sudo docker save quay.io/centos/centos:stream9-minimal -o /tmp/base-image.tar
178+
sudo docker run --rm --privileged --network=host \
179+
-v ${{ github.workspace }}/ci/cached-builds/Containerfile.test-network:/tmp/Containerfile.test-network:ro \
180+
-v /tmp/base-image.tar:/tmp/base-image.tar:ro \
181+
registry.fedoraproject.org/fedora:44 \
182+
bash -c '
183+
dnf install -y --quiet podman
184+
podman load < /tmp/base-image.tar
185+
echo "=== --userns=host --network=host with pre-loaded image ==="
186+
podman build --pull=never --userns=host --network=host \
187+
-t test-userns-net -f /tmp/Containerfile.test-network /tmp/ \
188+
&& echo "USERNS+NETWORK BUILD: OK" || echo "USERNS+NETWORK BUILD: FAILED"
189+
'
190+
191+
- name: "Test: _CONTAINERS_USERNS_CONFIGURED + podman pull"
192+
if: ${{ !cancelled() }}
193+
run: |
194+
set -x
195+
sudo docker run --rm --privileged --network=host \
196+
-e _CONTAINERS_USERNS_CONFIGURED=1 \
197+
registry.fedoraproject.org/fedora:44 \
198+
bash -c '
199+
dnf install -y --quiet podman
200+
echo "=== _CONTAINERS_USERNS_CONFIGURED=$_CONTAINERS_USERNS_CONFIGURED ==="
201+
echo "=== This env var may skip MaybeReexecUsingUserNamespace ==="
202+
podman pull quay.io/centos/centos:stream9-minimal \
203+
&& echo "USERNS_CONFIGURED PULL: OK" || echo "USERNS_CONFIGURED PULL: FAILED"
204+
'
205+
151206
- name: "Diagnose: namespace and socket deep dive"
152207
if: ${{ !cancelled() }}
153208
run: |

0 commit comments

Comments
 (0)