-
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
Pasta networking ignores --network-cmd-path
#18560
Comments
Here's the related code: podman/libpod/networking_pasta_linux.go Lines 25 to 28 in 493aac6
In comparison, here's slirp4netns' binary lookup code (plus some duplicate code): podman/libpod/networking_slirp4netns.go Lines 216 to 223 in 493aac6
According to the manpage, podman/docs/source/markdown/podman.1.md Lines 85 to 86 in 493aac6
IMHO both slirp4netns and pasta should first check CC: @sbrivio-rh |
The docs are wrong, this works as designed. We really should not use one conf field for two different things. This would just break people who already use this for slirp4netns. Do you really need a cli option for this? I think the I know we have a lot of older dependencies which all use their own fields but I try to have new things use |
I'm a bit torn about this... On one hand I absolutely agree, using the same I can't follow your point that using $ podman run -it --rm --network=pasta --network-cmd-path=./pasta alpine sh or $ podman run -it --rm --network=slirp4netns --network-cmd-path=./slirp4netns alpine sh The Anyway, I said that I'm torn about it: |
Well one field is just much less maintenance overhead. I find it much more simple to only call
Well sure for a single podman run but this a config field. We have no idea if is was set on the cli or the file in the network code. And even if we do we still have the |
All valid points: I was neither aware that So yeah, we might leave it with Besides the docs being wrong about |
Yes docs must be fixed, changing slirp4netns over sounds good to me as well. We can deprecate but breaking changes (i.e. removing) can only be done for major versions. And even then I would like to keep breaking changes to a minimum. |
Okay, so we have three tasks here:
|
I added |
The `--network-cmd-path` CLI option only affects rootless networks using `slirp4netns(1)`, not `pasta(1)`. Following #18568 Podman should rather use the more generic `r.config.FindHelperBinary()` method (and therefore honour the `helper_binaries_dir` config) to find the path to the `slirp4netns` binary and deprecate the misleading `--network-cmd-path` CLI option. However, since this wasn't implemented yet we can't deprecate `--network-cmd-path` as of now. Adding a note anyway. Fixes #18560 Signed-off-by: Daniel Rudolf <[email protected]>
Issue Description
Podman doesn't honour the
--network-cmd-path
CLI option to find thepasta
binary when attempting to use Pasta networking.Steps to reproduce the issue
Without
pasta
installed globally (i.e. there's no/usr/bin/pasta
), but with a locally buildpasta
binary in the current working dir (i.e../pasta
exists and works fine):Describe the results you received
Podman fails to find the
pasta
binary in$PWD
, because it ignores--network-cmd-path
and still tries to find it in$PATH
.Describe the results you expected
Podman should use
$PWD/pasta
.podman info output
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
n/a
Additional information
Using the
CONTAINERS_HELPER_BINARY_DIR
env variable works:$ CONTAINERS_HELPER_BINARY_DIR="$PWD" podman run -it --rm --network=pasta alpine sh
The text was updated successfully, but these errors were encountered: