-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
CONTAINER_HOST takes precedence over --connection argument #15588
Comments
@mheon is this expected behavior? if not I can probably switch it around easily |
Precedence on the environment variables ( |
The problem is presumably that 'container host/url' and 'container connection' are handled separately, currently with 'host/url' taking precedence over 'connection'. However, they correspond to the same underlying thing (how to connect), so the CLI |
A friendly reminder that this issue had no activity for 30 days. |
This got lost in the flood of issues, because of the stale-issue flag. Is this still an issue? |
/kind bug
Description
When connecting to a remote podman server,
CONTAINER_HOST
takes precedence over the--connection
argument andCONTAINER_CONNECTION
variable when selecting the remote in a way that is confusing to the user.Steps to reproduce the issue:
With two VMs setup with ssh over ports 48011 and 48012:
podman-remote system connection add foo --identity ~/.ssh/id_rsa ssh://root@localhost:48011/run/podman/podman.sock
(add foo remote)podman-remote system connection add bar --identity ~/.ssh/id_rsa ssh://root@localhost:48012/run/podman/podman.sock
(add bar remote)export CONTAINER_HOST=ssh://root@localhost:48011/run/podman/podman.sock
(set foo as host)podman-remote run -it ubuntu bash
(launch container on foo)podman-remote --connection bar ps
(check running containers on bar)Describe the results you received:
When attempting to connect to the
bar
VM which has no running containers,podman-remote
picks up thefoo
connection fromCONTAINER_HOST
and shows me:Describe the results you expected:
I expect no containers to be running because I have explicitly passed a connection to the
bar
remote.Expect
CONTAINER_CONNECTION
and the--connection
argument to take precedence over theCONTAINER_HOST
variable.Additional information you deem important (e.g. issue happens only occasionally):
Even when the default connection is set to be
bar
, ifCONTAINER_HOST
points atfoo
thenpodman-remote
connects tofoo
. It is not always obvious that an environment variable is set and can be confusing when a CLI arg is used that it does not take precedence.Output of
podman version
:Output of
podman info
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Tried on latest podman?
No
The text was updated successfully, but these errors were encountered: