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: concurrent map writes error in VolumeBinding plugin during Filter #96777
Conversation
Hi @lianghao208. 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. |
pkg/scheduler/framework/plugins/volumebinding/volume_binding.go
Outdated
Show resolved
Hide resolved
pkg/scheduler/framework/plugins/volumebinding/volume_binding.go
Outdated
Show resolved
Hide resolved
/ok-to-test |
/retest |
2 similar comments
/retest |
/retest |
pkg/scheduler/framework/plugins/volumebinding/volume_binding.go
Outdated
Show resolved
Hide resolved
pkg/scheduler/framework/plugins/volumebinding/volume_binding.go
Outdated
Show resolved
Hide resolved
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.
is it possible to add a test case for "concurrent map write" case?
pkg/scheduler/framework/plugins/volumebinding/volume_binding.go
Outdated
Show resolved
Hide resolved
pkg/scheduler/framework/plugins/volumebinding/volume_binding.go
Outdated
Show resolved
Hide resolved
pkg/scheduler/framework/plugins/volumebinding/volume_binding.go
Outdated
Show resolved
Hide resolved
@lianghao208 You can try to run related UT by providing |
@Huang-Wei I don't think providing |
/retest |
I'm ok with this pure fix. /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahg-g, cofyc, lianghao208 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 |
/lgtm |
@ahg-g I guess it's too late to catch the 1.20 train. Let's wait for it to be merged in master(1.21),and cherry pick to 1.20.1? |
@Huang-Wei If this patch needs backport v.19 and v.20, do I need to submit PR to cherry pick? |
sg, lets patch back to v1.9 and v1.20 |
/triage accepted |
actually we can set the milestone to get it merged since this is a critical bug /milestone v1.20 |
/retest |
@lianghao208 once this is merged, please create a patch against the 1.19 branch, the follow command should automatically create one when this is merged:
|
@ahg-g will do. |
Yes, you can leverage |
…96777-upstream-release-1.19 Automated cherry pick of #96777: fix: concurrent map writes error in VolumeBinding plugin during Filter
What type of PR is this?
/kind bug
/sig scheduling
What this PR does / why we need it:
this PR fix the issue #96772 mentioning concurrent map writes error in VolumeBinding plugin during Filter. The reason is framework.CycleState will be cloned e.g. when invoking addNominatedPods()
kubernetes/pkg/scheduler/core/generic_scheduler.go
Line 388 in 8095565
when
CycleState
is cloned during filtering, new mutex is created, butstateData
is not cloned, we should set a mutex lock in struct stateData to make sure using the same mutex when updating stateData.podVolumesByNodeWhich issue(s) this PR fixes:
Fixes #96772
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
no