-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Fixes a race in deviceplugin/manager_test.go and a race in deviceplug… #52561
Fixes a race in deviceplugin/manager_test.go and a race in deviceplug… #52561
Conversation
/release-note-none |
/assign @mindprince @dchen1107 |
309ca42
to
dfbe5cf
Compare
/assign @RenaudWasTaken |
@jiayingz: GitHub didn't allow me to assign the following users: RenaudWasTaken. Note that only kubernetes members can be assigned. 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. |
dfbe5cf
to
798ae70
Compare
/retest |
ad3708b
to
2ab77e0
Compare
/approve |
We are still leaking a goroutine in |
@jiayingz @RenaudWasTaken Do we need this for 1.8? |
2ab77e0
to
34dccc5
Compare
/assign @vishh |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dchen1107, jiayingz, vishh Associated issue: 52560 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/test all |
/retest |
1 similar comment
/retest |
@@ -70,7 +70,7 @@ func (m *Stub) Start() error { | |||
// Wait till grpc server is ready. | |||
for i := 0; i < 10; i++ { |
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 whole loop is useless. m.server.GetServiceInfo()
returns the number of services as soon as RegisterDevicePluginServer
is called.
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.
I think it returns the number of services when they are ready, not as soon as RegisterDevicePluginServer is called.
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.
https://github.com/grpc/grpc-go/blob/master/server.go#L376
You can also test this:
m.server = grpc.NewServer([]grpc.ServerOption{}...)
pluginapi.RegisterDevicePluginServer(m.server, m)
fmt.Println(m.server.GetServiceInfo())
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.
Hmm, this is interesting to know. I thought GetServiceInfo returns ready-to-serve no. of methods, but looking at the code, it is indeed should return No. of methods right after registration. However, I did verify that if I removed this code block, running 'bazel test --runs_per_test=20 //pkg/kubelet/deviceplugin:go_default_test' became flaky (I think mostly on endpoint_test.go) but with the current code, the tests all passed. I think we will need to spend more time understand this code. For now, I would like to keep it this way to make sure the tests are not flaky.
/retest |
1 similar comment
/retest |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here.. |
…in/manager.go.
What this PR does / why we need it:
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes ##52560
Special notes for your reviewer:
Tested with go test -count 50 -race k8s.io/kubernetes/pkg/kubelet/deviceplugin and all runs passed.
Release note: