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

Add the http2 GOAWAY error to IsProbableEOF for ignoring in watch #73277

Merged
merged 1 commit into from
Jan 24, 2019

Conversation

smarterclayton
Copy link
Contributor

@smarterclayton smarterclayton commented Jan 24, 2019

http2 is allowed to tell us to go away, and for watch it is safe to exit and restart in almost all cases where a connection is forcibly closed by the upstream. This error message happens a lot behind ELB and other http2 aware proxies.

Treat the error as "basically done" as suggested by: golang/go#18639 (comment)

Otherwise, we log at V(0) which shows up in command line tools, scripting, etc and is totally not actionable.

For instance, in a CLI tool using watch.Until against an apiserver behind AWS ELB:

level=info msg="Waiting up to 30m0s for the bootstrap-complete event..."
E0124 06:00:48.845920      29 streamwatcher.go:109] Unable to decode an event from the watch stream: http2: server sent GOAWAY and closed the connection; LastStreamID=3, ErrCode=NO_ERROR, debug=""

/kind bug

When a watch is closed by an HTTP2 load balancer and we are told to go away, skip printing the message to stderr by default.

http2 is allowed to tell us to go away, and for watch it is safe
to exit and restart in almost all cases where a connection is
forcibly closed by the upstream. This error message happens a lot
behind ELB and other http2 aware proxies.

Treat the error as "basically done" as suggested by

golang/go#18639 (comment)
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jan 24, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: smarterclayton

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 Jan 24, 2019
@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jan 24, 2019
@liggitt
Copy link
Member

liggitt commented Jan 24, 2019

/lgtm

this also would affect this code path:

if err != nil {
// The watch stream mechanism handles many common partial data errors, so closed
// connections can be retried in many cases.
if net.IsProbableEOF(err) {
return watch.NewEmptyWatch(), nil
}
return nil, err
}

given the other network errors that were triggering the code path, that seems reasonable

is there any way to test this to catch message drift?

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 24, 2019
@fedebongio
Copy link
Contributor

/assign @roycaihw

@fedebongio
Copy link
Contributor

/cc @wenjiaswe

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. 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. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants