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
add support for pasta(1) and slirp4netns options #4877
add support for pasta(1) and slirp4netns options #4877
Conversation
includes new packages for slirp4netns and pasta Signed-off-by: Paul Holzinger <pholzing@redhat.com>
859dab7
to
fcda575
Compare
This uses the same code as podman for slirp4netns, this means - ipv6 is enabled by default - slirp4netns options are read from contianers.conf - slirp4netns options can now be set on the cli. This required some small rework on where we parse the network string. Lastly I updated the --network docs, to document the new slirp4netns mode. That included fixing up buildah-from and buildah-run pages which were incomplete in that regard. Now we show the same for all options. Fixes containers#3968 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Like podman allow buildah and therefore podman build to use the network mode pasta. The pasta integration is very simple and we do not even need a teardown handler for that as pasta will exit on its own when the netns path is removed. However right now this is broken, pasta will fail to open /proc/$pid/ns/net. I send a patch[1] to fix this upstream in pasta. I assume this will land quickly so I like to get this in now just so we have this included in podman v4.6. Thus the test is skipped for now. [1] https://archives.passt.top/passt-dev/20230623082531.25947-2-pholzing@redhat.com/ Signed-off-by: Paul Holzinger <pholzing@redhat.com>
fcda575
to
74b885b
Compare
bytes, disable NDP, DHCPv6 and DHCP support. | ||
- **pasta:-I,tap0,--ipv4-only,-a,10.0.2.0,-n,24,-g,10.0.2.2,--dns-forward,10.0.2.3,--no-ndp,--no-dhcpv6,--no-dhcp**, | ||
equivalent to default slirp4netns(1) options with Podman overrides: same as | ||
above, but leave the MTU to 65520 bytes |
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.
Maybe it's a lack of tea, but I'm not at all understanding the words after the colon here. I think "same as above" refers to the line pasta:--ipv4-only,-a,10.0.2.0,-n,24,-g,10.0.2.2,--dns-forward,10.0.2.3,-m,1500,--no-ndp,--no-dhcpv6,--no-dhcp,
, but I'm not sure. I'd suggest saying something like, " this is the same as the prior --ipv4-only
example, but leave the MTU at 65520 bytes" I'm just mostly concerned if someone many months from now slaps another example between the lines and the "same as above" is no longer pertinent.
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.
This is copied from podman. And both really just show how to make pasta behave more like slirp4netns. I mean sure I can change it but both examples should really stay together IMO.
One small doc comment, otherwise LGTM. |
|
That was only mentioned in the buildah-from man page. I rather have all three pages have the same text as they do the same thing. I don't know why this one still says container but it is a bug to me because (d05957a) removed it. It is only in the code for backwards compat so I don't think it should be documented. |
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 other than comments above.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: flouthoc, Luap99 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 |
I'm going to push this one through to get the functionality. If there's more nits to pick on the docs, let's do that in separate PRs. |
/lgtm |
Support was added in buildah some weeks ago. [1] [1] containers/buildah#4877 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Support was added in buildah some weeks ago. [1] [1] containers/buildah#4877 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Support was added in buildah some weeks ago. [1] [1] containers/buildah#4877 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
What type of PR is this?
/kind feature
What this PR does / why we need it:
This uses the same code as podman for slirp4netns, this means
small rework on where we parse the network string.
Lastly I updated the --network docs, to document the new slirp4netns
mode. That included fixing up buildah-from and buildah-run pages which
were incomplete in that regard. Now we show the same for all options.
Like podman allow buildah and therefore podman build to use the network
mode pasta. The pasta integration is very simple and we do not even
need a teardown handler for that as pasta will exit on its own when the
netns path is removed.
However right now this is broken, pasta will fail to open
/proc/$pid/ns/net. I send a patch[1] to fix this upstream in pasta.
I assume this will land quickly so I like to get this in now just so we
have this included in podman v4.6. Thus the test is skipped for now.
[1] https://archives.passt.top/passt-dev/20230623082531.25947-2-pholzing@redhat.com/
How to verify it
Which issue(s) this PR fixes:
Fixes #3968
Special notes for your reviewer:
Does this PR introduce a user-facing change?