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 recipe requires pasta now as well, or extra configuration to avoid needing pasta #173699

Closed
4 tasks done
mtalexan opened this issue Jun 4, 2024 · 13 comments · Fixed by #180879
Closed
4 tasks done
Labels
bug Reproducible Homebrew/homebrew-core bug

Comments

@mtalexan
Copy link

mtalexan commented Jun 4, 2024

brew gist-logs <formula> link OR brew config AND brew doctor output

╰─❯ brew gist-logs podman
Error: No logs.

╰─❯ brew config
HOMEBREW_VERSION: 4.3.3
ORIGIN: https://github.com/Homebrew/brew
HEAD: e130e47f23b8b806096f9ec4f2c193213b8ec908
Last commit: 2 days ago
Core tap JSON: 04 Jun 17:29 UTC
HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: :1
HOMEBREW_EDITOR: nvim
HOMEBREW_MAKE_JOBS: 12
Homebrew Ruby: 3.3.2 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.2/bin/ruby
CPU: dodeca-core 64-bit unknown_0x6_0xa5
Clang: N/A
Git: 2.34.1 => /bin/git
Curl: 7.81.0 => /bin/curl
Kernel: Linux 6.5.0-35-generic x86_64 GNU/Linux
OS: Ubuntu 22.04.4 LTS (jammy)
Host glibc: 2.35
/usr/bin/gcc: 11.4.0
/usr/bin/ruby: N/A
glibc: N/A
gcc@11: N/A
gcc: N/A
xorg: N/A

╰─❯ brew doctor
Your system is ready to brew.

Verification

  • My brew doctor output says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.
  • I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.

What were you trying to do (and why)?

Installing latest podman and run a container with it.

What happened (include all command output)?

╰─❯ brew install podman
  ... snip ... (successful)
╰─❯ podman run --rm -it hello-world
Error: could not find pasta, the network namespace can't be configured: exec: "pasta": executable file not found in $PATH

podman version 5.0 changed the default rootlessNetworkCmd from slirp4netns to pasta. slirp4netns is currently installed as part of the podman recipie, but pasta is not, nor has it been packaged for Homebrew/Linuxbrew at all.

The problem can be solved in the short term by setting/modifying the default /etc/containers/containers.conf or /usr/share/containers.conf file to include an override for this default setting, restoring it back to the prior default that is actually provided with the podman recipe:

[networking]
default_rootless_network_cmd="slirp4netns"

At least until pasta is available from brew and included with podman.

What did you expect to happen?

The container runs successfully without erroring out on missing tool errors.

Step-by-step reproduction instructions (by running brew commands)

On any Linux system without `podman` or `psst` (the package that installs `pasta`) already installed, run:
1. `brew install podman`
2. `podman run --rm -it hello-world`
@mtalexan mtalexan added the bug Reproducible Homebrew/homebrew-core bug label Jun 4, 2024
@mtalexan
Copy link
Author

mtalexan commented Jun 4, 2024

The options for where to set the containers.conf setting are given here: https://docs.podman.io/en/latest/markdown/podman.1.html#configuration-files

I'm not familiar with Ruby or the Homebrew recipies or I'd submit a PR myself. Changing the config should (theoretically) be pretty easy(?) until someone is nice enough to package psst and it can be listed as a dependency of the podman recipe.

Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Jun 25, 2024
@mtalexan
Copy link
Author

Bump

@YevheniiPokhvalii
Copy link

YevheniiPokhvalii commented Jul 7, 2024

That's really a problem. Messing with the configurations did not help. I can't even roll back to the podman v4 via brew. I also tried to install pasta myself which led to even more errors.

I had to uninstall podman via brew and install an old 3.4.4 version by apt.

@sbrivio-rh
Copy link

I also tried to install pasta myself which led to even more errors.

That's the way I suggested in containers/podman#22015: treat passt (passt package) as a system dependency (at least for the moment being), because updated packages are available on most distributions.

Which errors did you get?

@mtalexan
Copy link
Author

mtalexan commented Jul 8, 2024

That's the way I suggested in containers/podman#22015: treat passt (passt package) as a system dependency (at least for the moment being), because updated packages are available on most distributions.

The only systems it's packaged for are the same systems that also have the latest podman available as a native package, and therefore have no reason to install podman thru brew.

My recommendation is to just do what I mention at the end of the original post and add the configuration key that sets podman back to using slirp4netns instead (for now). There was nothing wrong with it before, podman 5.x still supports both, and basically any system you ate installing podman via brew on won't have the passt package for pasta.

@sbrivio-rh
Copy link

The only systems it's packaged for are the same systems that also have the latest podman available as a native package

Not really. For example, Debian testing and Ubuntu 24.10 ship a very recent version of the passt package, but they still ship Podman 4.9.x.

What distribution are you referring to?

@mtalexan
Copy link
Author

mtalexan commented Jul 8, 2024

For Debian and Ubuntu, released (non-testing) and LTS are what most people are using. If you're interested in up to date packages, very rarely does anyone pick a Debian-based distro.

Ubuntu 24.04 (the latest LTS) doesn't have passt for example (I believe, when I was looking), nor does it have any version of podman.

I'm not sure where you got info about 24.10, that doesn't release until October 2024 (year 24, month 10 = 24.10). Did you mean 23.10 maybe?

@sbrivio-rh
Copy link

Ubuntu 24.04 (the latest LTS) doesn't have passt for example (I believe, when I was looking)

It does: https://packages.ubuntu.com/source/noble/passt -- not the latest, but quite recent.

nor does it have any version of podman.

Why not? https://packages.ubuntu.com/source/noble/libpod -- again, not the latest, but from a few months ago.

I'm not sure where you got info about 24.10, that doesn't release until October 2024 (year 24, month 10 = 24.10). Did you mean 23.10 maybe?

No, I meant yet-to-be-released 24.10, see: https://packages.ubuntu.com/source/oracular/passt.

@mtalexan
Copy link
Author

mtalexan commented Jul 8, 2024

My mistake then. I was primarily concerned with older 22.04 systems I have this deployed on and didn't look enough to find it in 24.04 apparently.

Generally I'd recommend installing podman from the native package manager if there's a still supported version. Third party package managers like Homebrew don't provide much benefit in my experience when there's a recent version also available from your native distro. There's a more difficult integration that needs to happen for the third party package manager.

@github-actions github-actions bot removed the stale No recent activity label Jul 26, 2024
@cho-m
Copy link
Member

cho-m commented Aug 11, 2024

I opened a PR for passt (#180110). When it is merged, may need someone to see if it works as I don't have a Linux setup to try it out.

@YevheniiPokhvalii
Copy link

YevheniiPokhvalii commented Aug 12, 2024

I opened a PR for passt (#180110). When it is merged, may need someone to see if it works as I don't have a Linux setup to try it out.

It does not work, unfortunately.

After installing a new version of Podman on Ubuntu 22.04.4 LTS.
I got an error

~$ podman run -it --entrypoint bash 5dc641ff1f99
WARN[0000] Using cgroups-v1 which is deprecated in favor of cgroups-v2 with Podman v5 and will be removed in a future version. Set environment variable `PODMAN_IGNORE_CGROUPSV1_WARNING` to hide this warning.
Error: OCI runtime error: crun: unknown version specified
~$ podman version
WARN[0000] Using cgroups-v1 which is deprecated in favor of cgroups-v2 with Podman v5 and will be removed in a future version. Set environment variable `PODMAN_IGNORE_CGROUPSV1_WARNING` to hide this warning.
Client:       Podman Engine
Version:      5.2.0
API Version:  5.2.0
Go Version:   go1.22.6
Git Commit:   b22d5c61eef93475413724f49fd6a32980d2c746-dirty
Built:        Thu Aug  1 20:32:02 2024
OS/Arch:      linux/amd64

$ crun --version
crun version 1.16
commit: 2dc1598e7e56157b3414eb6c9f9efbb5ce9f5e44
rundir: /run/user/1000/crun
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL

Podman info:

~$ podman info | grep crun
WARN[0000] Using cgroups-v1 which is deprecated in favor of cgroups-v2 with Podman v5 and will be removed in a future version. Set environment variable `PODMAN_IGNORE_CGROUPSV1_WARNING` to hide this warning.
    name: crun
    package: crun_0.17+dfsg-1.1ubuntu0.1_amd64
    path: /usr/bin/crun
      crun version 0.17

Reference:
containers/podman#22068

@sbrivio-rh
Copy link

I opened a PR for passt (#180110). When it is merged, may need someone to see if it works as I don't have a Linux setup to try it out.

It does not work, unfortunately.

After installing a new version of Podman on Ubuntu 22.04.4 LTS. I got an error

~$ podman run -it --entrypoint bash 5dc641ff1f99
WARN[0000] Using cgroups-v1 which is deprecated in favor of cgroups-v2 with Podman v5 and will be removed in a future version. Set environment variable `PODMAN_IGNORE_CGROUPSV1_WARNING` to hide this warning.
Error: OCI runtime error: crun: unknown version specified

This looks unrelated, it seems to match containers/crun#1485. The problem is that while you have crun 1.16 installed, possibly via Homebrew:

$ crun --version
crun version 1.16
commit: 2dc1598e7e56157b3414eb6c9f9efbb5ce9f5e44
rundir: /run/user/1000/crun
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL

Podman is using 0.17 instead:

Podman info:

~$ podman info | grep crun
WARN[0000] Using cgroups-v1 which is deprecated in favor of cgroups-v2 with Podman v5 and will be removed in a future version. Set environment variable `PODMAN_IGNORE_CGROUPSV1_WARNING` to hide this warning.
    name: crun
    package: crun_0.17+dfsg-1.1ubuntu0.1_amd64
    path: /usr/bin/crun
      crun version 0.17

which is installed as Ubuntu package. Can you apt-get remove crun (if it doesn't break dependencies) and try again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Reproducible Homebrew/homebrew-core bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants