Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Add socat back. #729

Merged
merged 1 commit into from
Apr 11, 2018
Merged

Add socat back. #729

merged 1 commit into from
Apr 11, 2018

Conversation

Random-Liu
Copy link
Member

@Random-Liu Random-Liu commented Apr 11, 2018

io.Copy doesn't work for us. The main problem is that:

  1. When one side (either pod side or user side) of portforward is closed, we should stop port forwarding.
  2. When one side is closed, the io.Copy use that side as source will close, but the io.Copy use that side as dest won't. (io.Copy doesn't stop when dest is closed until there is new input from source)
  3. However, we can't simply forcibly stop the hanging io.Copy by closing the source. Because TCP is bi-direction, even though one direction is closed (we know because one io.Copy stops), the other direction may not, and that io.Copy might be working. There is no way for us to know it now.

There should be some solution for this problem, and socat must have implemented that. We need more time to investigate it.

So let's switch back to socat for this release.

@abhi

Signed-off-by: Lantao Liu [email protected]

Signed-off-by: Lantao Liu <[email protected]>
@Random-Liu Random-Liu added this to the v1.0.0-rc.2 milestone Apr 11, 2018
Copy link
Member

@abhi abhi left a comment

Choose a reason for hiding this comment

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

LGTM

@AkihiroSuda
Copy link
Member

There should be some solution for this problem, and socat must have implemented that. We need more time to investigate it.

Could you open a github issue for tracking this?

@Random-Liu Random-Liu mentioned this pull request Apr 11, 2018
@Random-Liu
Copy link
Member Author

@AkihiroSuda Done. #730

Apply LGTM based on #729 (review)

@Random-Liu Random-Liu merged commit 77a33b1 into containerd:master Apr 11, 2018
@Random-Liu Random-Liu deleted the fix-portforward branch April 11, 2018 06:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants