Skip to content

Podman6: remove CNI#6453

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

Podman6: remove CNI#6453
lsm5 wants to merge 5 commits intocontainers:mainfrom
lsm5:podman6-no-cni

Conversation

@lsm5
Copy link
Member

@lsm5 lsm5 commented Oct 26, 2025

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Removes CNI for podman6

How to verify it

check if any CNI stuff still exists

Which issue(s) this PR fixes:

Special notes for your reviewer:

None

Does this PR introduce a user-facing change?

CNI support has been removed.

@lsm5 lsm5 added the podman 6 breaking changes that should only go into podman 6 label Oct 26, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 26, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lsm5

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@packit-as-a-service
Copy link

Ephemeral COPR build failed. @containers/packit-build please check.

1 similar comment
@packit-as-a-service
Copy link

Ephemeral COPR build failed. @containers/packit-build please check.

@lsm5 lsm5 force-pushed the podman6-no-cni branch 4 times, most recently from 32e105a to 79be198 Compare October 26, 2025 18:57
@github-actions
Copy link

A friendly reminder that this PR had no activity for 30 days.

Copy link
Member

@nalind nalind left a comment

Choose a reason for hiding this comment

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

Please avoid breaking the public API when possible.

CNIPluginPath string
// CNIConfigDir is the location of CNI configuration files, if the files in
// the default configuration directory shouldn't be used.
CNIConfigDir string
Copy link
Member

Choose a reason for hiding this comment

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

This is an API break. I'd prefer if these fields were marked as deprecated, like BuildOutput.

IPC string
Network string
PID string
UTS string
Copy link
Member

Choose a reason for hiding this comment

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

This is an API break.

CNIPluginPath string
// CNIConfigDir is the location of CNI configuration files, if the files in
// the default configuration directory shouldn't be used.
CNIConfigDir string
Copy link
Member

Choose a reason for hiding this comment

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

This is an API break. I'd prefer if the godoc for these fields noted that they are deprecated and are expected to be empty, possibly with a tag indicating that they won't be saved when encoded as JSON.

Capabilities []string
ConfigureNetwork string
CNIPluginPath string
CNIConfigDir string
Copy link
Member

Choose a reason for hiding this comment

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

This is an API break. I'd prefer if the godoc for these fields noted that they are deprecated and are expected to be empty.

CNIPluginPath string
// CNIConfigDir is the location of CNI configuration files, if the files in
// the default configuration directory shouldn't be used.
CNIConfigDir string
Copy link
Member

Choose a reason for hiding this comment

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

This is an API break. I'd prefer if these fields were marked as deprecated, like the define package's BuildOptions.BuildOutput.

CNIPluginPath string
// CNIConfigDir is the location of CNI configuration files, if the files in
// the default configuration directory shouldn't be used.
CNIConfigDir string
Copy link
Member

Choose a reason for hiding this comment

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

This is an API break. I'd prefer if these fields were marked as deprecated, like the define package's BuildOptions.BuildOutput.

@lsm5 lsm5 changed the title [WIP] Podman6: remove CNI Podman6: remove CNI Mar 12, 2026
@lsm5
Copy link
Member Author

lsm5 commented Mar 12, 2026

@nalind good for another look. The testing-farm job failures are a Fedora infra issue, already notified them.

@lsm5
Copy link
Member Author

lsm5 commented Mar 12, 2026

This will stay in draft until containers/container-libs#412 is merged.

@lsm5 lsm5 removed the stale-pr label Mar 12, 2026
cniPluginPath string
cniConfigDir string
// NetworkInterface is the libnetwork network interface used to setup CNI or netavark networks.
// networkInterface is the libnetwork network interface used to setup netavark networks.
Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM overall minus the one extra file

@lsm5 lsm5 force-pushed the podman6-no-cni branch 2 times, most recently from 0ba7a4b to e00419f Compare March 13, 2026 13:41
lsm5 added 5 commits March 17, 2026 14:14
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
Buildah no longer uses CNI for networking, so remove CNI spec version
and libcni version from the version command output, build-time linker
flags, and RPM spec. Also drop the FreeBSD CNI build tag from the
Makefile since netavark is now the only supported network backend.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
Mark CNIPluginPath and CNIConfigDir fields as deprecated in Builder,
BuilderInfo, BuilderOptions, RunOptions, and BuildOptions structs.
The fields are retained to avoid breaking the public API but are
no longer used and are expected to be empty.
Remove --cni-config-dir and --cni-plugin-path CLI flags. Simplify
getNetworkInterface() to no longer accept CNI-specific parameters
since netavark is now the only supported network backend.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
Remove the docs/cni-examples/ directory, CNI installation section from
install.md, and CNI fields from version man page. Remove the "from cni
config test" from tests/from.bats and clean up --cni-config-dir usage
from tests/namespaces.bats. Update comments that referenced CNI to
use generic network terminology.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
Remove the github.com/containernetworking/cni module from go.mod,
go.sum, and vendor since it is no longer used.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM

One more thing I found in the CI test scrip we have an rm -rf on the cni dir which can be dropped as well

# Remove /var/lib/cni, it is not required for rootless cni.
# We have to test that it works without this directory.
# https://github.com/containers/podman/issues/10857
rm -rf /var/lib/cni

Anyhow non blocking, tests look good here and this can be fixed easily later so I think it is better to merge now to continue the dance into podman

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

Labels

approved do-not-merge/work-in-progress podman 6 breaking changes that should only go into podman 6

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants