-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
portfordwardtester: avoid data loss during send+close+exit #37103
portfordwardtester: avoid data loss during send+close+exit #37103
Conversation
f38dc09
to
eb3c2ef
Compare
we have more places in the port-forward code path which just close a connection without CloseWrite or the rst wait: kubelet, client, apiserver. All of them have a simple |
/cc @fraenkel |
eb3c2ef
to
ba818f5
Compare
@sttts the e2e test is hard coded to use the 1.0 image. |
ba818f5
to
1b1c624
Compare
Note: the e2e tests are red until somebody builds and pushes the new image. |
1b1c624
to
73878f7
Compare
Jenkins GCE etcd3 e2e failed for commit 73878f7. Full PR test history. The magic incantation to run this job again is |
if err != nil { | ||
fmt.Printf("Error accepting connection: %v\n", err) | ||
os.Exit(1) | ||
} | ||
defer conn.Close() | ||
defer func() { |
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.
Why bother with a defer? If we don't make it to the bottom, what happens here won't really matter in the other cases.
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.
No real reason, only modified the existing defer.
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.
Removed the defer. Anything else left?
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.
Not until we see an issue.
350ee23
to
8870154
Compare
Jenkins Kubemark GCE e2e failed for commit 8870154. Full PR test history. The magic incantation to run this job again is |
@k8s-bot kubemark e2e test this |
8870154
to
6b06e62
Compare
6b06e62
to
bec3150
Compare
Jenkins GCE e2e failed for commit 6b06e6234c3858e8967ec4d8cea02665fb995d1e. Full PR test history. The magic incantation to run this job again is |
@k8s-bot kops aws e2e test this |
bec3150
to
2bb7903
Compare
1.2 image is pushed now as |
@k8s-bot test this issue |
Jenkins kops AWS e2e failed for commit 2bb7903. Full PR test history. The magic incantation to run this job again is |
Automatic merge from submit-queue (batch tested with PRs 37608, 37103, 37320, 37607, 37678) |
Looks like this has made it worse. |
Don't we need an updated socat for this to work properly? |
I thought that this direction should work with the old socat. I am holding back the big PR because of the socat update. |
Yes, I forgot that this was the minor change. |
Removing label |
Commit found in the "release-1.4" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked. |
Following https://blog.netherlabs.nl/articles/2009/01/18/the-ultimate-so_linger-page-or-why-is-my-tcp-not-reliable when closing the sending connection in the port-forward-tester container.
Potentially fixing #27680
This change is