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

machine: fix default connection URL to use 127.0.0.1 #18565

Merged
merged 1 commit into from
May 16, 2023

Conversation

Luap99
Copy link
Member

@Luap99 Luap99 commented May 15, 2023

gvproxy listens on 127.0.0.1, using localhost as hostname can result in the client trying to connect to the ipv6 localhost (::1). This will fail as shown in the issue. This switches the hostname in the system connection to 127.0.0.1 to fix this problem.
I switched the qemu, hyperV and WSL backend. I haven't touched the applehv code because it uses two different ips and I am not sure what is the correct thing there. I leave this to Brent to figure out.

[1] https://github.com/containers/gvisor-tap-vsock/blob/main/cmd/gvproxy/main.go#L197-L199

Fixes #16470

Does this PR introduce a user-facing change?

Fixed a problem where podman machine connections would try to connect to the ipv6 localhost ipv6 (::1).

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 15, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Luap99

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 15, 2023
Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM

@Luap99
Copy link
Member Author

Luap99 commented May 15, 2023

@baude @n1hility PTAL, I am not 100% on the WSL change but looking there it now also supports gvproxy so I assumed we need the same fix.

@Luap99 Luap99 force-pushed the machine-localhost branch from 6f592c2 to 42478b5 Compare May 15, 2023 15:13
@n1hility
Copy link
Member

n1hility commented May 15, 2023

@Luap99 By coincidence, both names will work on WSL (they forward both). However, I think this is the right thing to do for consistency and so folks don't get confused.

LGTM

@TomSweeneyRedHat
Copy link
Member

LGTM
@Luap99 looks like you need a rebase, which is a shame as all the tests are happy ATM.

gvproxy listens on 127.0.0.1, using localhost as hostname can result in
the client trying to connect to the ipv6 localhost (`::1`). This will
fail as shown in the issue. This switches the hostname in the system
connection to 127.0.0.1 to fix this problem.
I switched the qemu, hyperV and WSL backend. I haven't touched the
applehv code because it uses two different ips and I am not sure what is
the correct thing there. I leave this to Brent to figure out.

[NO NEW TESTS NEEDED]

[1] https://github.com/containers/gvisor-tap-vsock/blob/main/cmd/gvproxy/main.go#L197-L199

Fixes containers#16470

Signed-off-by: Paul Holzinger <[email protected]>
@Luap99 Luap99 force-pushed the machine-localhost branch from 42478b5 to ce07860 Compare May 16, 2023 08:55
@rhatdan
Copy link
Member

rhatdan commented May 16, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 16, 2023
@openshift-merge-robot openshift-merge-robot merged commit 3c8d120 into containers:main May 16, 2023
@Luap99 Luap99 deleted the machine-localhost branch May 16, 2023 16:06
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Aug 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

podman generated remote connections may fail from possible mismatch between "localhost" and 127.0.0.1 listener
6 participants