-
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
wsl: usernet: Don't always bind to port 2222 #24070
base: main
Are you sure you want to change the base?
Conversation
Ephemeral COPR build failed. @containers/packit-build please check. |
podman-machine starts gvproxy without specifying -ssh-port. This means it will always bind port 2222 (see containers/gvisor-tap-vsock#402), effectively bypassing the dynamic ssh port allocation. I don't think wsl needs this port to be opened/bound on the host, but this commit starts gvproxy with -ssh-port set to the dynamic SSH port to avoid port conflicts with crc. When gvproxy allows to disable this port forwarding entirely, we can revise this. This should fix containers#20327 Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: baude, cfergeau 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 |
LGTM, @l0rd wdyt? |
@@ -99,7 +99,7 @@ func startUserModeNetworking(mc *vmconfigs.MachineConfig) error { | |||
|
|||
// Start or reuse | |||
if !running { | |||
if err := launchUserModeNetDist(exe); err != nil { | |||
if err := launchUserModeNetDist(exe, mc.SSH.Port); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are using the machine SSH port there I'm afraid there will be a conflict between gvproxy and win-sshproxy
looking at it |
I confirm that, as anticipated by @jeffmaury, this unfortunately doesn't work.
|
The WSL |
podman-machine starts gvproxy without specifying -ssh-port.
This means it will always bind port 2222 (see
containers/gvisor-tap-vsock#402), effectively
bypassing the dynamic ssh port allocation.
I don't think wsl needs this port to be opened/bound on the host, but
this commit starts gvproxy with -ssh-port set to the dynamic SSH port to
avoid port conflicts with crc.
When gvproxy allows to disable this port forwarding entirely, we can
revise this.
This should fix #20327
Does this PR introduce a user-facing change?