-
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: use RootlessKit port forwarder #4592
rootless: use RootlessKit port forwarder #4592
Conversation
fcdd90d
to
1d2583b
Compare
Is CI failure related? |
Search tests? Probably a registry flake, I'll restart |
Reverted to WIP due to an UDP issue: rootless-containers/rootlesskit#86 |
I am impressed by the results, good work! Is RootlessKit copying the connection from the listen socket on the host to the socket in the network namespace? Is that something |
Only the FD of
Not easy |
I just restarted the failing test in hopes that it's a flake.... |
1d2583b
to
a9d9b31
Compare
UDP issue (rootless-containers/rootlesskit#86) was resolved in RootlessKit v0.7.1 (rootless-containers/rootlesskit#87). Updated PR. |
Is CI passing or not? |
Seems green to me |
Hm. SPECIAL_TESTING_ROOTLESS failed, according to Cirrus |
Where is the failure log? |
It should show up in Github automatically. I re-triggered the tests to hopefully fix things. If that doesn't work you might want to make a trivial change and force-push to retrigger CI |
☔ The latest upstream changes (presumably #4730) made this pull request unmergeable. Please resolve the merge conflicts. |
b63d50e
to
aca41f8
Compare
reexec stuff doesn't seem working with |
one thing to do is to inject the
that is not enough though, as the @AkihiroSuda could we move the |
thanks, I'll look into that.
How is this implemented to keep the process alive? |
the patch I've provided above does that. It passes a FD to conmon that will be kept open until conmon runs. When it exits, the FD passed down to conmon will be closed as well: https://github.com/containers/conmon/blob/master/src/conmon.c#L1763-L1780 |
aca41f8
to
8201f12
Compare
8201f12
to
f7bfdce
Compare
f7bfdce
to
0e248da
Compare
RootlessKit port forwarder has a lot of advantages over the slirp4netns port forwarder: * Very high throughput. Benchmark result on Travis: socat: 5.2 Gbps, slirp4netns: 8.3 Gbps, RootlessKit: 27.3 Gbps (https://travis-ci.org/rootless-containers/rootlesskit/builds/597056377) * Connections from the host are treated as 127.0.0.1 rather than 10.0.2.2 in the namespace. No UDP issue (containers#4586) * No tcp_rmem issue (containers#4537) * Probably works with IPv6. Even if not, it is trivial to support IPv6. (containers#4311) * Easily extensible for future support of SCTP * Easily extensible for future support of `lxc-user-nic` SUID network RootlessKit port forwarder has been already adopted as the default port forwarder by Rootless Docker/Moby, and no issue has been reported AFAIK. As the port forwarder is imported as a Go package, no `rootlesskit` binary is required for Podman. Fix containers#4586 May-fix containers#4559 Fix containers#4537 May-fix containers#4311 See https://github.com/rootless-containers/rootlesskit/blob/v0.7.0/pkg/port/builtin/builtin.go Signed-off-by: Akihiro Suda <[email protected]>
0e248da
to
da7595a
Compare
Thanks, now it works with |
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 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 |
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
RootlessKit port forwarder has a lot of advantages over the slirp4netns port forwarder:
Very high throughput.
Benchmark result on Travis: socat: 5.2 Gbps, slirp4netns: 8.3 Gbps, RootlessKit: 27.3 Gbps
(https://travis-ci.org/rootless-containers/rootlesskit/builds/597056377)
Connections from the host are treated as 127.0.0.1 rather than 10.0.2.2 in the namespace.
No UDP issue ([rootless] slirp4netns w/ --disable-host-loopback: host initiated udp communication container <-> host impossible #4586)
No tcp_rmem issue (Rootless: slirp4netns slow initial input to container #4537)
Probably works with IPv6. Even if not, it is trivial to support IPv6. (podman does not forward ipv6 ports #4311)
Easily extensible for future support of SCTP
Easily extensible for future support of
lxc-user-nic
SUID networkHuman-readable error messages (--publish error message is not clear #4804)
RootlessKit port forwarder has been already adopted as the default port forwarder by Rootless Docker/Moby, and no issue has been reported AFAIK w.r.t. TCP forwarding.
As the port forwarder is imported as a Go package, no
rootlesskit
binary is required for Podman.Fix #4586
May-fix #4559
Fix #4537
May-fix #4311
Fix #4804
See https://github.com/rootless-containers/rootlesskit/tree/v0.7.1/pkg/port/builtin
Signed-off-by: Akihiro Suda [email protected]