Skip to content
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

podman: drop slirp4netns which has been replaced by passt #313670

Merged
merged 4 commits into from
Sep 9, 2024

Conversation

SuperSandro2000
Copy link
Member

@SuperSandro2000 SuperSandro2000 commented May 22, 2024

see https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.20.0#podman_5.x

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@dawidd6
Copy link
Contributor

dawidd6 commented May 22, 2024

slirp4netns function argument should be removed too, as it is not used anywhere anymore.

@ofborg ofborg bot requested review from vdemeester and saschagrunert May 22, 2024 13:43
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels May 22, 2024
Copy link
Contributor

@dawidd6 dawidd6 left a comment

Choose a reason for hiding this comment

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

Not a maintainer of this package but lgtm

@SuperSandro2000 SuperSandro2000 marked this pull request as ready for review May 22, 2024 22:38
@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label May 23, 2024
@SebTM
Copy link
Contributor

SebTM commented May 27, 2024

Hey, currently it's possible due to it's still included to switch back through:

virtualisation.containers.containersConf.settings.network.default_rootless_network_cmd = "slirp4netns";

e.g. if you are experiencing issue with the switch as I did initially - so I would ask if it's viable to make it optional and/or add an option/check the option when building the config to include it?

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Jun 10, 2024
@SuperSandro2000
Copy link
Member Author

@SebTM can you check the latest commit?

@wegank wegank removed the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Jun 15, 2024
@SebTM
Copy link
Contributor

SebTM commented Jun 21, 2024

Result of nixpkgs-review pr 313670 run on x86_64-linux 1

2 packages blacklisted:
  • nixos-install-tools
  • tests.nixos-functions.nixos-test
5 packages built:
  • apx
  • apx-gui
  • out-of-tree
  • podman
  • podman.man

Copy link
Contributor

@SebTM SebTM left a comment

Choose a reason for hiding this comment

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

LGTM ✌🏻 (tested locally on top of unstable)

@SebTM SebTM added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Jun 21, 2024
@wegank wegank added 12.approvals: 2 This PR was reviewed and approved by two reputable people and removed 12.approvals: 1 This PR was reviewed and approved by one reputable person labels Jun 26, 2024
@SebTM
Copy link
Contributor

SebTM commented Jul 9, 2024

@SuperSandro2000 you agree?

@SebTM SebTM requested review from Aleksanaa and dawidd6 July 9, 2024 22:12
@wegank wegank removed the 12.approvals: 2 This PR was reviewed and approved by two reputable people label Aug 10, 2024
@SebTM SebTM requested a review from a team September 8, 2024 18:45
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/4543

@SebTM SebTM added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Sep 8, 2024
@Aleksanaa Aleksanaa merged commit 03e62e5 into NixOS:master Sep 9, 2024
28 checks passed
@SuperSandro2000 SuperSandro2000 deleted the podman-slirp4netns branch September 9, 2024 11:17
@stratdev3
Copy link

Recently upgrade to nixos 24.11, anormal amount of bugs for a major release... And so bug with podman.

virtualisation.containers.containersConf.settings.network.default_rootless_network_cmd = "slirp4netns";

This is not working.

podman run --rm --name test --net=slirp4netns -it kroniak/ssh-client /bin/bash
Error: could not find slirp4netns, the network namespace can't be configured: exec: "slirp4netns": executable file not found in $PATH

To retrieve slirp4netns i have to add it to environment.systemPackages and then it's ok.

At last, i use slirp4netns only to connect to host from container.
I found a better way to do this in nixos 24.11 (podman v5.2.3) waiting for the podman v5.3 to be in the stable nixos repository

podman run --rm --name test -it --network pasta:--map-guest-addr,169.254.1.2 --add-host host.containers.internal:169.254.1.2 kroniak/ssh-client /bin/bash
  • use the default pasta network but with a new parameter map-guest-addr which point to ip 169.254.1.2 (will be the default ip in v5.3)
  • add host to map the famous host.containers.internal to ip.

Once inside the container, the host is reachable with host.containers.internal like it was in podman 4.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 12.approvals: 1 This PR was reviewed and approved by one reputable person
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants