Skip to content

[28.x backport] dockerd-rootless.sh: if no slirp4netns, try pasta#51162

Merged
thaJeztah merged 2 commits intomoby:28.xfrom
vvoland:51149-28.x
Oct 10, 2025
Merged

[28.x backport] dockerd-rootless.sh: if no slirp4netns, try pasta#51162
thaJeztah merged 2 commits intomoby:28.xfrom
vvoland:51149-28.x

Conversation

@vvoland
Copy link
Copy Markdown
Contributor

@vvoland vvoland commented Oct 10, 2025

- What I did

In the dockerd-rootless.sh script, if there's no slirp4netns try pasta before falling back to VPNkit.

When pasta is the network driver, the default port driver is implicit instead of builtin.

Also (second commit), if slirp4netns is selected by env-var, still set its default MTU to 65520.

- How I did it

The notes at the top of the script say "Needs recent version of pasta (2023_12_04)" ... but I'm not sure how to check for that. The reported version number depends on the packager, and I don't know of a command line option to check for (like slirp4netns's check for `--netns-type). As it's no longer that new, perhaps a version check isn't essential ... but can add one if there's a way?

- How to verify it

On a Debian Trixie host, with moby 28.5.1, I tried ...

  • with slirp4netns installed, it was used as normal
  • without it ...
    • dockerd-rootless.sh -> ok (running with pasta)
      • started a rootless nginx with -p 8080:80 and checked it worked
    • DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER=builtin dockerd-rootless.sh -> error
    • DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER=implicit dockerd-rootless.sh -> ok
  • without slirp4netns or pasta or vpnkit -> error

- Human readable description for the release notes

- dockerd-rootless.sh: if slirp4netns is not installed, try using pasta (passt).

Signed-off-by: Rob Murray <[email protected]>
(cherry picked from commit 7e63d2a)
Signed-off-by: Paweł Gronowski <[email protected]>
When DOCKERD_ROOTLESS_ROOTLESSKIT_MTU is not set, and ...
- DOCKERD_ROOTLESS_ROOTLESSKIT_NET is not set and slirp4netns
  is selected, MTU defaults to 65520.
- DOCKERD_ROOTLESS_ROOTLESSKIT_NET=slirp4netns, MTU defaults
  to 1500.

Change the logic so that, however slirp4netns is selected, MTU
defaults to 65520.

Signed-off-by: Rob Murray <[email protected]>
(cherry picked from commit a6206f2)
Signed-off-by: Paweł Gronowski <[email protected]>
@vvoland vvoland self-assigned this Oct 10, 2025
@vvoland vvoland added status/2-code-review kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. impact/changelog area/rootless Rootless Mode labels Oct 10, 2025
@vvoland vvoland added this to the 28.5.2 milestone Oct 10, 2025
Copy link
Copy Markdown
Contributor

@robmry robmry left a comment

Choose a reason for hiding this comment

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

LGTM - thank you!

Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

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

Labels

area/rootless Rootless Mode impact/changelog kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants