Skip to content

Podman6: Vendor update w/o CNI + additional cleanups#28202

Draft
lsm5 wants to merge 6 commits intocontainers:mainfrom
lsm5:podman6-no-cni-vendor
Draft

Podman6: Vendor update w/o CNI + additional cleanups#28202
lsm5 wants to merge 6 commits intocontainers:mainfrom
lsm5:podman6-no-cni-vendor

Conversation

@lsm5
Copy link
Member

@lsm5 lsm5 commented Mar 5, 2026

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?

None

Depends on containers/container-libs#412 and containers/buildah#6453

@lsm5 lsm5 added 6.0 Breaking changes for Podman 6.0 No New Tests Allow PR to proceed without adding regression tests labels Mar 5, 2026
@lsm5 lsm5 changed the title Podman6 no cni vendor Podman6: Vendor update w/o CNI + additional cleanups Mar 5, 2026
@lsm5 lsm5 force-pushed the podman6-no-cni-vendor branch 2 times, most recently from 5c5a90a to 03729cf Compare March 6, 2026 13:34
@packit-as-a-service
Copy link

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

@lsm5 lsm5 added the bloat_approved Approve a PR in which binary file size grows by over 50k label Mar 9, 2026
@lsm5 lsm5 force-pushed the podman6-no-cni-vendor branch 3 times, most recently from 197e4ca to 466972b Compare March 9, 2026 11:08
@lsm5 lsm5 force-pushed the podman6-no-cni-vendor branch 4 times, most recently from f3db031 to dc09bbb Compare March 11, 2026 11:48
@lsm5
Copy link
Member Author

lsm5 commented Mar 11, 2026

@containers/podman-maintainers PTAL. Will keep in draft until buildah and container-libs PRs are merged (see description for links).

@lsm5 lsm5 force-pushed the podman6-no-cni-vendor branch from dc09bbb to cf6c000 Compare March 12, 2026 12:32
@Luap99
Copy link
Member

Luap99 commented Mar 12, 2026

Looks like the compose tests are failing here. I don't think it is related to your cni removal though so likely another container -libs change

@Luap99
Copy link
Member

Luap99 commented Mar 12, 2026

compose failure is reproduced using podman main with container-libs main so ignore that for your work

$ go get go.podman.io/storage@main && go get go.podman.io/image/v5@main &&  go get go.podman.io/common@main && make vendor && make binaries

$ ./test/compose/test-compose ipam
...
Error response from daemon: IPAM error: requested ip address 10.123.0.253 is already allocated to container ID 5715be599bbbe0eb0b647273a2532835e13448421edc651ee45b00b62751d8ad

@Honny1 I think that might be related to your multiple static ip work, can you look into this?

@Honny1
Copy link
Member

Honny1 commented Mar 12, 2026

Let me check that.

@Honny1
Copy link
Member

Honny1 commented Mar 12, 2026

Compat API adds the IP address twice.

// if IP address is provided
if endpoint.IPAddress.IsValid() {
staticIP := net.IP(endpoint.IPAddress.AsSlice())
netOpts.StaticIPs = append(netOpts.StaticIPs, staticIP)
}
if endpoint.IPAMConfig != nil {
// if IPAMConfig.IPv4Address is provided
if endpoint.IPAMConfig.IPv4Address.IsValid() {
staticIP := net.IP(endpoint.IPAMConfig.IPv4Address.AsSlice())
netOpts.StaticIPs = append(netOpts.StaticIPs, staticIP)
}
// if IPAMConfig.IPv6Address is provided
if endpoint.IPAMConfig.IPv6Address.IsValid() {
staticIP := net.IP(endpoint.IPAMConfig.IPv6Address.AsSlice())
netOpts.StaticIPs = append(netOpts.StaticIPs, staticIP)
}
}

I need to check Docker documentation on how it should be handled. I will address that with #27775.

@Luap99
Copy link
Member

Luap99 commented Mar 12, 2026

I need to check Docker documentation on how it should be handled. I will address that with #27775.

I think likely one setting is preferred over the other? In general I guess a simple fix could be to deduplicate the slice with slices.Sort followed slices.Compact on the ips otherwise?

@Honny1
Copy link
Member

Honny1 commented Mar 12, 2026

I need to check Docker documentation on how it should be handled. I will address that with #27775.

I think likely one setting is preferred over the other? In general I guess a simple fix could be to deduplicate the slice with slices.Sort followed slices.Compact on the ips otherwise?

Deduplication is a possibility.


I found that endpoint.IPAddress represents operational state; from what I've seen in the Docker code, it isn't used for configuration. I still need to verify this through testing Docker. So maybe we should match that behavor but it is a breaking change.

@Luap99
Copy link
Member

Luap99 commented Mar 12, 2026

So maybe we should match that behavor but it is a breaking change.

This is docker API, anything docker does not do we have always been very open to just break to make it behave like docker.

@lsm5 lsm5 force-pushed the podman6-no-cni-vendor branch 3 times, most recently from e41a207 to 13bd396 Compare March 13, 2026 14:52
@lsm5
Copy link
Member Author

lsm5 commented Mar 16, 2026

I guess the machine-linux podman fedora-43-aarch64 rootless host test is also dependent on docker API? It's also failing on #27775

@Luap99
Copy link
Member

Luap99 commented Mar 16, 2026

machine-linux podman fedora-43-aarch64 rootless host

That is a timeout out that is flaking everywhere, I hope #28299 improves the situation for it.

val, ok = os.LookupEnv("CNI_CONFIG_DIR")
if ok {
cmd = append(cmd, "--network-config-dir", val)
}
Copy link
Member

Choose a reason for hiding this comment

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

practically speaking that cli flag also is used by netavark, though sure if there are no known users of this config right now I am good dropping it fully

$ podman-remote info
```

### 29) Rootless CNI networking fails in RHEL with Podman v2.2.1 to v3.0.1.
Copy link
Member

Choose a reason for hiding this comment

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

maybe we should do that commit elsewhere

While I agree removing the numbers makes sense it means it breaks all existing links. i.e. anyone linking to the headers https://github.com/containers/podman/blob/main/troubleshooting.md#1-variety-of-issues---validate-version

I think we should keep the numbers because of that, I think we can drop this entry and just skip the number 29. Generally I am not opposed to drop the numbers but lets not do this as part of cni removal PR here so we can get some more people to chime in on such a change

Copy link
Member Author

Choose a reason for hiding this comment

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

sgtm. Reverted and dropped number 29. This as well as the docs/source/locale/ja updates (also for slirp) could be in separate PRs.

skip_if_remote "--metadata-file not supported in remote mode" \
"bud cache by format"

skip_if_remote "--isolation not supported via podman-remote" \
Copy link
Member

Choose a reason for hiding this comment

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

does is not true AFAICT

podman build --isolation && --arch runs as e2e test as remote just fine?

What is the exact error here, I would not object skipping on remote if it is a true cannot be supported on remote but the --isolation flag does not seem to be the reason.

Copy link
Member Author

@lsm5 lsm5 Mar 17, 2026

Choose a reason for hiding this comment

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

my bad, you're right, --isolation as a flag works fine on remote. The issue is the second part of the test added in containers/buildah#6697 which uses the BUILDAH_ISOLATION env var:

BUILDAH_ISOLATION=chroot run_buildah 125 build --network=none $WITH_POLICY_JSON ${TEST_SCRATCH_DIR}
expect_output --substring "cannot set --network other than host with --isolation chroot"

The BUILDAH_ISOLATION env var is not propagated to the server via podman-remote. On remote, line 124 in cmd/podman/common/build.go resets the isolation default to "", so the env var silently has no effect:

// Unset the isolation default as we never want to send this over the API
// as it can be wrong (root vs rootless).
_ = flags.Lookup("isolation").Value.Set("")

Here's the exact behavior difference:

# Local podman - works correctly:
$ BUILDAH_ISOLATION=chroot ./bin/podman build --network=none /dev/null
Error: cannot set --network other than host with --isolation chroot

# podman-remote - env var silently ignored, wrong error:
$ BUILDAH_ISOLATION=chroot ./bin/podman-remote build --network=none /dev/null
Error: context must be a directory: "/dev/null"

The test expects "cannot set --network other than host with --isolation chroot" but on remote it never gets that error because the env var has no effect. Updated the skip reason to "BUILDAH_ISOLATION env var not propagated via podman-remote" to be precise.

lsm5 added 6 commits March 17, 2026 17:18
Update download.FromURL call for new signature

The download.FromURL function in container-libs/common now requires
a context.Context and download.Options parameter.

rootlessport: clarify RootlessCNI comment

Update the comment for the RootlessCNI conditional to clarify that
the flag is for rootless bridge networking, not CNI specifically.
The bool is set when netStatus != nil in slirp4netns and will be
removed when slirp4netns and rootlessport are fully dropped.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
Update comments that reference CNI as a network backend since it
has been removed.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
The CNI_CONFIG_DIR environment variable is no longer relevant now
that CNI support has been removed.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
The cni build tag for FreeBSD is no longer needed now that CNI
support has been removed from the codebase.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
The BUILDAH_ISOLATION env var is not propagated to the server via
podman-remote. The buildah bud test (added in buildah PR containers#6697) sets
BUILDAH_ISOLATION=chroot to verify the --network conflict, which
silently has no effect on remote, causing the test to fail.

Ref: containers/buildah#6697

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
@lsm5 lsm5 force-pushed the podman6-no-cni-vendor branch from df4f9f2 to 52bf071 Compare March 17, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.0 Breaking changes for Podman 6.0 bloat_approved Approve a PR in which binary file size grows by over 50k No New Tests Allow PR to proceed without adding regression tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants