Skip to content

Conversation

@Honny1
Copy link
Member

@Honny1 Honny1 commented Dec 15, 2025

This PR introduces comprehensive e2e tests for the multi-IP container feature, which allows users to assign multiple static IP addresses to a single container across single and multi-subnet networks.

Additionally, it refactors network inspection in e2e tests by introducing a reusable InspectNetwork() helper function that eliminates duplicate code across the test suite. This helper replaces repetitive manual inspection + JSON unmarshaling patterns with a single, consistent interface.

Fixes: https://issues.redhat.com/browse/RHEL-98277

Related: containers/netavark#1379
Related: containers/container-libs#557

Checklist

Ensure you have completed the following checklist for your pull request to be reviewed:

  • Certify you wrote the patch or otherwise have the right to pass it on as an open-source patch by signing all
    commits. (git commit -s). (If needed, use git commit -s --amend). The author email must match
    the sign-off email address. See CONTRIBUTING.md
    for more information.
  • Referenced issues using Fixes: #00000 in commit message (if applicable)
  • Tests have been added/updated (or no tests are needed)
  • Documentation has been updated (or no documentation changes are needed)
  • All commits pass make validatepr (format/lint checks)
  • Release note entered in the section below (or None if no user-facing changes)

Does this PR introduce a user-facing change?

Support assigning multiple static IP addresses to a single container interface via podman run (e.g., `--network net:ip=...` flag), allowing complex network configurations without requiring the elevated `NET_ADMIN` privilege.

Add tests for multiple static IPs per container across single and multi-subnet networks.
Document --network option for comma-separated IPs and subnet-based IP ordering.

Fixes: https://issues.redhat.com/browse/RHEL-98277

Signed-off-by: Jan Rodák <[email protected]>
@Honny1 Honny1 force-pushed the multiple-static-ips branch from 9a01a0a to 374b849 Compare December 15, 2025 16:51
@packit-as-a-service
Copy link

[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore.

{
name: "multiple static IPs in single subnet",
subnets: []string{"10.86.0.0/16"},
staticIPs: []string{"10.86.0.10", "10.86.0.11", "10.86.0.12"},
Copy link
Contributor

@vikas-goel vikas-goel Dec 15, 2025

Choose a reason for hiding this comment

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

Will be good to add a test case for IP address input in CIDR format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants