-
Notifications
You must be signed in to change notification settings - Fork 40.9k
Ensure thread safety for devicesToReuse Map #130051
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
base: master
Are you sure you want to change the base?
Ensure thread safety for devicesToReuse Map #130051
Conversation
The committers listed above are authorized under a signed CLA. |
Welcome @wangshulei098! |
Hi @wangshulei098. 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-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: wangshulei098 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
fe89f68
to
e9ddef5
Compare
e9ddef5
to
d8d17c4
Compare
should solve #130050 |
/ok-to-test yes, this helps but is time we do (I can do that) a full review all the uses of the map and solve these issues once for good |
good opinion. |
@wangshulei098 Can you add a unit or/and e2e tests covering this use case? It's usually requested for bugfixes. /triage accepted |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
What type of PR is this?
/kind bug
What this PR does / why we need it:
as reported in issue #1300508 , a concurrent read-and-write for calling Allocate in device manager may cause Kubelet to panic, all because of the re-allocating logic .
Which issue(s) this PR fixes:
Fixes #1300508
Special notes for your reviewer
it's a little hard to reproduce. When we concurrently create a large number of Pods with device equipment, it may be triggered, provided that the concurrency is high.
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: