Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix kubernetes port forwarding from hanging in certain edge cases. #1785

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

Merged

Conversation

iciclespider
Copy link
Contributor

@iciclespider iciclespider commented Apr 30, 2022

What type of PR is this?

/kind bug
/kind failing-test

What this PR does / why we need it:

It turns out SSL sockets can buffer data such that the select method is not aware of it. See:

https://docs.python.org/3/library/ssl.html#notes-on-non-blocking-sockets
https://docs.python.org/3/library/ssl.html#ssl.SSLSocket.pending

Best viewed hiding whitespace.

Which issue(s) this PR fixes:

Fixes #1300
Fixes #1481

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 30, 2022
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 30, 2022
@iciclespider iciclespider force-pushed the fix-port-forward-hang branch 2 times, most recently from f56ba9a to 08b41ad Compare April 30, 2022 07:40
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 30, 2022
@iciclespider iciclespider force-pushed the fix-port-forward-hang branch 13 times, most recently from 18b6305 to 78354b1 Compare May 1, 2022 16:32
@iciclespider iciclespider force-pushed the fix-port-forward-hang branch from 78354b1 to 7d0cd17 Compare May 1, 2022 16:42
@roycaihw
Copy link
Member

roycaihw commented May 9, 2022

/assign

@roycaihw
Copy link
Member

roycaihw commented May 9, 2022

/assign @yliaog

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels May 24, 2022
@yliaog
Copy link
Contributor

yliaog commented Jun 7, 2022

Thanks for the explanation and fixing the issue.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 7, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: iciclespider, yliaog

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 7, 2022
@k8s-ci-robot k8s-ci-robot merged commit c76f0df into kubernetes-client:master Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test flake: kubernetes/e2e_test/test_client.py::TestClient::test_portforward_raw
4 participants