-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uses/requires CNI for slirp4ns #4687
Comments
I think it's |
a sorry; played around too much with these parameters to find a solution. It happens for
or (when CNI networks are defined), the TAP interfaceis attached to the CNI bridge:
and in another shell
|
Ack, that definitely sounds like a bug in how we're configuring slirp as root. |
To demonstrate the real problem:
Output in step 5 shows the expected
But sometimes the internal private IP appears:
|
A friendly reminder that this issue had no activity for 30 days. |
@AkihiroSuda Could you comment on this? |
Why are you trying to run slirp4netns as root? |
I don't think this is a problem with Slirp itself - it sounds like we're not properly respecting the requested slirp4netns setting and applying CNI as well. A lot of networking code is written with the implicit assumption that root=CNI, rootless=slirp - I bet that's where this slipped in. |
Our networking code bakes in a lot of assumptions about how networking should work - that CNI is *always* used with root, and that slirp4netns is *always* used only with rootless. These are not safe assumptions. This fixes one particular issue, which would cause CNI to also be run when slirp4netns was requested as root. Fixes: containers#4687 Signed-off-by: Matthew Heon <mheon@redhat.com>
/kind bug
Description
When running podman in root mode, it requires/uses CNI to build slirp4ns networks. In rootless mode with same parameters, CNI is not used.
CNI is problematic because it messes around with
iptables
directly which breaks when they are managed externally. For this, I need a pure userspace solution (more or less likedockerd --iptables=false
) like slirp4ns.Steps to reproduce the issue:
rm -rf /etc/cni/net.d
(or keep it and usepodman inspect
later to see whether CNI is used)run as root:
run as user:
Describe the results you received:
Step 2 fails with
Step 3 succeeds.
Describe the results you expected:
Step 2 succeeds and CNI is not used.
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):The text was updated successfully, but these errors were encountered: