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

portfordwardtester: avoid data loss during send+close+exit #37103

Conversation

sttts
Copy link
Contributor

@sttts sttts commented Nov 18, 2016

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 Reviewable

@sttts sttts added sig/network Categorizes an issue or PR as relevant to SIG Network. area/test kind/flake Categorizes issue or PR as related to a flaky test. labels Nov 18, 2016
@sttts sttts force-pushed the sttts-portforwardtester-linger-on-exit branch from f38dc09 to eb3c2ef Compare November 18, 2016 17:16
@sttts
Copy link
Contributor Author

sttts commented Nov 18, 2016

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 io.Copy loop forwarding the data.

@sttts
Copy link
Contributor Author

sttts commented Nov 18, 2016

/cc @fraenkel

@sttts sttts force-pushed the sttts-portforwardtester-linger-on-exit branch from eb3c2ef to ba818f5 Compare November 18, 2016 17:23
@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note-label-needed labels Nov 18, 2016
@fraenkel
Copy link
Contributor

@sttts the e2e test is hard coded to use the 1.0 image.
I am not even sure who/where the image is built and uploaded.

@sttts sttts force-pushed the sttts-portforwardtester-linger-on-exit branch from ba818f5 to 1b1c624 Compare November 18, 2016 19:04
@sttts sttts added release-note-none Denotes a PR that doesn't merit a release note. and removed release-note-label-needed labels Nov 21, 2016
@sttts
Copy link
Contributor Author

sttts commented Nov 21, 2016

Note: the e2e tests are red until somebody builds and pushes the new image.

@sttts sttts force-pushed the sttts-portforwardtester-linger-on-exit branch from 1b1c624 to 73878f7 Compare November 21, 2016 08:09
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 21, 2016
@k8s-ci-robot
Copy link
Contributor

Jenkins GCE etcd3 e2e failed for commit 73878f7. Full PR test history.

The magic incantation to run this job again is @k8s-bot gce etcd3 e2e test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

if err != nil {
fmt.Printf("Error accepting connection: %v\n", err)
os.Exit(1)
}
defer conn.Close()
defer func() {
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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.

@sttts sttts force-pushed the sttts-portforwardtester-linger-on-exit branch from 350ee23 to 8870154 Compare November 22, 2016 07:35
@k8s-ci-robot
Copy link
Contributor

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. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

@sttts
Copy link
Contributor Author

sttts commented Nov 22, 2016

@k8s-bot kubemark e2e test this

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 24, 2016
@sttts sttts force-pushed the sttts-portforwardtester-linger-on-exit branch from 8870154 to 6b06e62 Compare November 29, 2016 08:41
@sttts sttts force-pushed the sttts-portforwardtester-linger-on-exit branch from 6b06e62 to bec3150 Compare November 29, 2016 08:42
@sttts sttts removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 29, 2016
@k8s-ci-robot
Copy link
Contributor

Jenkins GCE e2e failed for commit 6b06e6234c3858e8967ec4d8cea02665fb995d1e. Full PR test history.

The magic incantation to run this job again is @k8s-bot cvm gce e2e test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

@sttts
Copy link
Contributor Author

sttts commented Nov 29, 2016

@k8s-bot kops aws e2e test this

2 similar comments
@sttts
Copy link
Contributor Author

sttts commented Nov 29, 2016

@k8s-bot kops aws e2e test this

@sttts
Copy link
Contributor Author

sttts commented Nov 29, 2016

@k8s-bot kops aws e2e test this

@sttts sttts force-pushed the sttts-portforwardtester-linger-on-exit branch from bec3150 to 2bb7903 Compare November 30, 2016 06:59
@sttts sttts added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 30, 2016
@sttts
Copy link
Contributor Author

sttts commented Nov 30, 2016

1.2 image is pushed now as gcr.io/google_containers/portforwardtester:1.2.

@sttts
Copy link
Contributor Author

sttts commented Dec 2, 2016

@k8s-bot test this issue

@k8s-ci-robot
Copy link
Contributor

Jenkins kops AWS e2e failed for commit 2bb7903. Full PR test history.

The magic incantation to run this job again is @k8s-bot kops aws e2e test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 37608, 37103, 37320, 37607, 37678)

@k8s-github-robot k8s-github-robot merged commit df89a3c into kubernetes:master Dec 3, 2016
@sttts
Copy link
Contributor Author

sttts commented Dec 5, 2016

Looks like this has made it worse.

@fraenkel
Copy link
Contributor

fraenkel commented Dec 5, 2016

Don't we need an updated socat for this to work properly?

@sttts
Copy link
Contributor Author

sttts commented Dec 5, 2016

I thought that this direction should work with the old socat. I am holding back the big PR because of the socat update.

@fraenkel
Copy link
Contributor

fraenkel commented Dec 5, 2016

Yes, I forgot that this was the minor change.

@k8s-cherrypick-bot
Copy link

Removing label cherrypick-candidate because no release milestone was set. This is an invalid state and thus this PR is not being considered for cherry-pick to any release branch. Please add an appropriate release milestone and then re-add the label.

@sttts sttts added this to the v1.6 milestone Dec 12, 2016
@jessfraz jessfraz modified the milestones: v1.4, v1.6 Dec 14, 2016
@jessfraz jessfraz added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Dec 14, 2016
@jessfraz jessfraz added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Dec 14, 2016
jessfraz added a commit that referenced this pull request Dec 15, 2016
@k8s-cherrypick-bot
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/flake Categorizes issue or PR as related to a flaky test. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/network Categorizes an issue or PR as relevant to SIG Network. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants