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
More testcases for GOAWAY #94390
More testcases for GOAWAY #94390
Conversation
Hi @answer1991. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
@answer1991: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
2cc1138
to
5935118
Compare
/ok-to-test |
/assign @deads2k |
5935118
to
19522db
Compare
/test pull-kubernetes-e2e-gce-ubuntu-containerd |
GOAWAYResponse = compbasemetrics.NewCounter( | ||
&compbasemetrics.CounterOpts{ | ||
Name: "apiserver_goaway_response", | ||
Help: "Number of requests which server response with GOAWAY frame", |
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.
response -> responded
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.
Also what time period? if you see the previous 2, they say in last second
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.
Looks like we are adding something new apiserver_goaway_response
so this is not just adding test cases. am i reading this right?
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.
Sorry, I used a wrong metrics type. I will fixed it later.
so this is not just adding test cases. am i reading this right? - yes, 2 commits.
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.
Also what time period? if you see the previous 2, they say in last second
The last two metrics are gauges, this is a counter, counters don't have time frames.
However I do think it'd be good to add this metric in a separate PR. I'd like to take the tests first.
The metric is about connections (right?), but the other metrics here are about requests. So it's confusing and I think we should talk about that more. Looks like the tests don't depend on this metric, so hopefully it won't be much trouble to send it in a separate PR.
responseBodySize = len(responseBody) | ||
|
||
// requestPostBody is the request body which client must send to test GOAWAY server for POST method, | ||
// otherwise, test GOAWAY server will response 400 HTTP status code. |
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.
(nit: "response" is a noun, "respond" is the verb)
19522db
to
434fd2a
Compare
Fixed the nit and removed the metrics commit. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: answer1991, lavalamp 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 |
/test pull-kubernetes-e2e-kind |
Adding milestone - this is purely test change. /milestone v1.20 |
/kind cleanup |
|
||
// TestGOAWAYConcurrency tests GOAWAY frame will not affect concurrency requests in a single http client instance. | ||
// Known issues in history: https://github.com/kubernetes/kubernetes/issues/91131. | ||
func TestGOAWAYConcurrency(t *testing.T) { |
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.
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.
caused by golang http/http2 pkg, I have already opened an issue #41234 at golang repo .
if err != nil { | ||
t.Fatalf("unexpect connection err: %v", err) | ||
} | ||
localAddr = append(localAddr, conn.LocalAddr().String()) |
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.
this added a data race on unguarded localAddr, fixed in #94530
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.
As far as I know, it's not the root cause of TestClientReceivedGOAWAY flake, because dial a new connection only when client send a new request, and in this case, requests are sent one by one. In other words, if this line cause data race, then the additional unexpected connection set up, which means the test case or the configuration has problem.
I'm still debug the root cause of TestClientReceivedGOAWAY flake, for now, I doubt that I used an incorrect http2 server/client configuration(http.Transport.MaxConnsPerHost=1
or SETTINGS_MAX_CONCURRENT_STREAMS limited), or the dial function ignored context.Context which will cause more than one goroutine dial the connection when the first canceled.
Another interesting thing is I got a data race result that read at if tc.expectConnections != len(localAddr)
(main testing goroutine) and write at localAddr = append(localAddr, conn.LocalAddr().String())
, I'm very confused why the client try to set-up a new connection when we finished all requests.
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
TestGOAWAYConcurrency
) to check if GOAWAY affect concurrency requestsWhich issue(s) this PR fixes:
Fixes #91131
Special notes for your reviewer:
go1.14.7 linux/amd64
(has not fixed GOAWAY issue), testcaseTestGOAWAYConcurrency
failed with error like:go1.15 linux/amd64
, testcaseTestGOAWAYConcurrency
succeed.Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: