Skip to content

Fix podman test compatibility: remove hardcoded network backend#14422

Merged
teacup-on-rockingchair merged 4 commits into
masterfrom
copilot/debug-podman-slirp4netns
Jun 14, 2026
Merged

Fix podman test compatibility: remove hardcoded network backend#14422
teacup-on-rockingchair merged 4 commits into
masterfrom
copilot/debug-podman-slirp4netns

Conversation

Copilot AI commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

Description:

Podman container tests failed on openSUSE with two sequential errors:

  1. Error: unknown option for slirp4netns: "mtu=1500" - older slirp4netns versions reject this parameter
  2. RuntimeError: Unable to extract SSH ports from the container - hardcoded network backend incompatible with newer podman installations

Changes to tests/ssg_test_suite/test_env.py:

  • Removed --network slirp4netns from container creation (line 536)
  • Added validation for empty/null port data in extract_port_map() (lines 575-584)
  • Preserved exception context via raise ... from exc for debugging (line 370)

Rationale:

Modern podman (4.x+) defaults to netavark; older installations use slirp4netns. Hardcoding either breaks compatibility. The MTU parameter was redundant (default=1500) and unsupported on older slirp4netns versions.

Letting podman auto-select its network backend ensures compatibility across:

  • Podman versions (3.x with slirp4netns, 4.x+ with netavark)
  • Linux distributions (openSUSE, RHEL, Ubuntu, Fedora)
  • Deployment modes (rootless, rootful)

Review Hints:

Single file changed. Key modification in PodmanTestEnv._new_container_from_image() removes two network-related parameters from the podman run command. Error handling improvements preserve exception chains for debugging.

The commit marked "(grafted)" in git log shows all repository files due to shallow clone artifact - actual changes limited to test_env.py.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@openshift-ci openshift-ci Bot added do-not-merge/work-in-progress Used by openshift-ci bot. needs-ok-to-test Used by openshift-ci bot. labels Feb 18, 2026
@openshift-ci

openshift-ci Bot commented Feb 18, 2026

Copy link
Copy Markdown

Hi @copilot. Thanks for your PR.

I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copilot AI changed the title [WIP] Debug Podman with slirp4netns Remove unsupported mtu parameter from podman slirp4netns configuration Feb 18, 2026
@Mab879

Mab879 commented Feb 18, 2026

Copy link
Copy Markdown
Member

Before we just go and revert this we should better understand the problem space.

@alanmcanonical thoughts?

Copilot AI changed the title Remove unsupported mtu parameter from podman slirp4netns configuration Fix podman container tests on openSUSE and systems with varying network backends Feb 18, 2026
@Mab879

Mab879 commented Feb 18, 2026

Copy link
Copy Markdown
Member

@copilot Why there an empty commit (d6bf415) on this PR?

Copilot AI changed the title Fix podman container tests on openSUSE and systems with varying network backends Fix podman test compatibility: remove hardcoded network backend Feb 19, 2026
@comps

comps commented Feb 19, 2026

Copy link
Copy Markdown
Collaborator

@Mab879 One thing valid here (and I wanted to file an issue about it, but didn't have time) is that podman 6.0 removes slirp4netns, so us selecting it explicitly is probably going to break something soon (in Fedora 44 and other bleeding-edge distros).

@alanmcanonical

Copy link
Copy Markdown
Contributor

Before we just go and revert this we should better understand the problem space.

@alanmcanonical thoughts?

Looked up the podman man, slirp4netns-mtu became available from https://docs.podman.io/en/v3.0/markdown/podman-run.1.html. I am considering available runtime fixes that can work across distros and podmans.

@alanmcanonical

Copy link
Copy Markdown
Contributor

After investigation, it was apparmor pasta profile which rejects the packet https://bugs.launchpad.net/snapd/+bug/2141298 in my local env. So the mtu option can be safely removed if the opensuse issue occurred from running container on ubuntu image

@teacup-on-rockingchair teacup-on-rockingchair left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me and does the job of running the podman container on openSUSE host

@teacup-on-rockingchair teacup-on-rockingchair marked this pull request as ready for review February 20, 2026 08:47
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Used by openshift-ci bot. label Feb 20, 2026
@teacup-on-rockingchair teacup-on-rockingchair added this to the 0.1.81 milestone Feb 20, 2026
@Mab879 Mab879 self-assigned this Feb 24, 2026
@openshift-merge-robot openshift-merge-robot added the needs-rebase Used by openshift-ci bot. label Feb 24, 2026

@Mab879 Mab879 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR needs a rebase on latest master and that blank commit should be removed as well.

@teacup-on-rockingchair teacup-on-rockingchair force-pushed the copilot/debug-podman-slirp4netns branch from a01fdee to c8bb633 Compare March 4, 2026 15:33
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Used by openshift-ci bot. label Mar 4, 2026
@Mab879

Mab879 commented May 4, 2026

Copy link
Copy Markdown
Member

@teacup-on-rockingchair this needs a rebase and my comment about the empty commit still stands.

@teacup-on-rockingchair teacup-on-rockingchair force-pushed the copilot/debug-podman-slirp4netns branch from c8bb633 to dcaf2b9 Compare May 5, 2026 06:11
@Mab879

Mab879 commented May 5, 2026

Copy link
Copy Markdown
Member

Sorry, looks like one more rebase on latest master is needed to get the required jobs done.

@teacup-on-rockingchair teacup-on-rockingchair force-pushed the copilot/debug-podman-slirp4netns branch from dcaf2b9 to 017b6ec Compare May 6, 2026 15:33
@Mab879

Mab879 commented May 6, 2026

Copy link
Copy Markdown
Member

The merge base of this PR is 38070ca, thus missing the required tests.

@Arden97 Arden97 modified the milestones: 0.1.81, 0.1.82 May 20, 2026
@Mab879

Mab879 commented Jun 11, 2026

Copy link
Copy Markdown
Member

@teacup-on-rockingchair can you please rebase this PR?

Copilot AI and others added 4 commits June 12, 2026 11:47
Co-authored-by: teacup-on-rockingchair <315160+teacup-on-rockingchair@users.noreply.github.com>
- Remove --network slirp4netns to use podman's default network backend
- Add better error handling in extract_port_map for edge cases
- Preserve original exception for better debugging in get_ssh_port
- Fixes compatibility across different podman/slirp4netns versions

Co-authored-by: teacup-on-rockingchair <315160+teacup-on-rockingchair@users.noreply.github.com>
- Remove redundant logging statement (exception is preserved via raise...from)
- Simplify validation logic by removing redundant length check
- Keep exception chaining for better debugging

Co-authored-by: teacup-on-rockingchair <315160+teacup-on-rockingchair@users.noreply.github.com>
@teacup-on-rockingchair teacup-on-rockingchair force-pushed the copilot/debug-podman-slirp4netns branch from 017b6ec to a22044d Compare June 12, 2026 08:48
@teacup-on-rockingchair

Copy link
Copy Markdown
Contributor

/retest-required

@openshift-ci

openshift-ci Bot commented Jun 12, 2026

Copy link
Copy Markdown

@Copilot: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/4.21-images a22044d link true /test 4.21-images
ci/prow/4.14-images a22044d link true /test 4.14-images
ci/prow/4.16-images a22044d link true /test 4.16-images
ci/prow/4.20-images a22044d link true /test 4.20-images
ci/prow/4.17-images a22044d link true /test 4.17-images
ci/prow/4.19-images a22044d link true /test 4.19-images
ci/prow/e2e-aws-openshift-node-compliance a22044d link true /test e2e-aws-openshift-node-compliance
ci/prow/e2e-aws-openshift-platform-compliance a22044d link true /test e2e-aws-openshift-platform-compliance

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@Mab879

Mab879 commented Jun 12, 2026

Copy link
Copy Markdown
Member

/packit rebuild-failed

@teacup-on-rockingchair teacup-on-rockingchair merged commit c3b212a into master Jun 14, 2026
65 of 74 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ok-to-test Used by openshift-ci bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants