-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
rootless: support podman network create
(CNI-in-slirp4netns)
#7460
rootless: support podman network create
(CNI-in-slirp4netns)
#7460
Conversation
70004d5
to
1715184
Compare
59128c5
to
b459f6f
Compare
podman network create
(CNI-in-slirp4netns)podman network create
(CNI-in-slirp4netns)
b459f6f
to
c8eca1e
Compare
f942857
to
2335d46
Compare
7b98f87
to
01ba1a5
Compare
CI green |
Signed-off-by: Akihiro Suda <[email protected]>
Usage: ``` $ podman network create foo $ podman run -d --name web --hostname web --network foo nginx:alpine $ podman run --rm --network foo alpine wget -O - http://web.dns.podman Connecting to web.dns.podman (10.88.4.6:80) ... <h1>Welcome to nginx!</h1> ... ``` See contrib/rootless-cni-infra for the design. Signed-off-by: Akihiro Suda <[email protected]>
01ba1a5
to
f82abc7
Compare
/approve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AkihiroSuda, giuseppe, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
var rootlessCNIInfraImage = map[string]string{ | ||
// Built from ../contrib/rootless-cni-infra | ||
// TODO: move to Podman's official quay | ||
"amd64": "ghcr.io/akihirosuda/podman-rootless-cni-infra:gd34868a13-amd64", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TomSweeneyRedHat Do you own the Quay? I want to make sure we have an action item to get this moved once it merges
|
||
// GetContainersWithoutLock is same as GetContainers but without lock | ||
func (r *Runtime) GetContainersWithoutLock(filters ...ContainerFilter) ([]*Container, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self: The runtime lock is actually not really useful anymore - we can probably just remove it. No action needed in this PR, I'll make a fresh one for it.
Very nice work @AkihiroSuda - this should make rootless a lot easier to work with! /lgtm |
Is this going to fix the issue where a rootless container cannot ping a server running on the host? The host is running postgresql, the rootless container wants to talk to it, but cannot "Connection Refused". Just want to know if this will address that, or do I need to raise a separate issue. |
Unrelated, please feel free to open an issue (with detailed reproducer) |
Thanks @AkihiroSuda, raised #7649 for the specific case I am seeing. |
Fix #6863 , #1733
This PR allows using CNI networks for rootless, by running CNI plugins inside a sandbox container that is running with slirp4netns.
See https://github.com/AkihiroSuda/podman-network-create-for-rootless-podman for the design.
Usage is same as Rootful Podman:
Still lacks:(EDIT: now implemented)podman run -p
deallocating unused netns(EDIT: now implemented)TODO: move
ghcr.io/akihirosuda/podman-rootless-cni-infra
to official quay