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

Fix client watch reestablishment handling of client-side timeouts #89652

Merged
merged 1 commit into from Apr 7, 2020

Conversation

liggitt
Copy link
Member

@liggitt liggitt commented Mar 30, 2020

What type of PR is this?
/kind bug

What this PR does / why we need it:
Fixes reflector behavior when it encounters watch decode errors because of client-side timeouts.

89620d5#diff-1b0009d2defb929b2d694386b30dd2acR116-R122 changed client behavior to react to errors in decoding watch events by reverting back to a full list, which is what we should do if an actual decode error occurs. However, our helper IsProbableEOF method does not detect disconnections caused by client-side timeouts, only server-side ones. When running through a proxy, server-initiated EOFs are not reliably detected by the client.

Adding client-side timeouts to the list of things IsProbableEOF considers "normal" reasons for a disconnect to occur resolves the issue.

Does this PR introduce a user-facing change?:

client-go: resolves an issue with informers falling back to full list requests when timeouts are encountered, rather than re-establishing a watch.

/cc @smarterclayton
/sig api-machinery

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/test sig/testing Categorizes an issue or PR as relevant to SIG Testing. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Mar 30, 2020
@wojtek-t
Copy link
Member

Nice!

/lgtm
/retest

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 30, 2020
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 30, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt

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

@liggitt
Copy link
Member Author

liggitt commented Mar 30, 2020

/retest

@wojtek-t
Copy link
Member

wojtek-t commented Apr 7, 2020

/lgtm

k8s-ci-robot added a commit that referenced this pull request Apr 9, 2020
Manual cherry pick of #89652: Fix client watch reestablishment handling of client-side timeouts
k8s-ci-robot added a commit that referenced this pull request Apr 9, 2020
Manual cherry pick of #89652: Fix client watch reestablishment handling of client-side timeouts
k8s-ci-robot added a commit that referenced this pull request Apr 10, 2020
Manual cherry pick of #89652: Fix client watch reestablishment handling of client-side timeouts
k8s-ci-robot added a commit that referenced this pull request Apr 10, 2020
Manual cherry pick of #89652: Fix client watch reestablishment handling of client-side timeouts
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. area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/testing Categorizes an issue or PR as relevant to SIG Testing. 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.

None yet

4 participants