-
Notifications
You must be signed in to change notification settings - Fork 143
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 race condition in store result map #107
Fix race condition in store result map #107
Conversation
* Add mutexes to every read/write access the store makes to the results map
Welcome @Ezetowers! |
Hi @Ezetowers. Thanks for your PR. I'm waiting for a kubernetes-sigs 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. |
/kind bug |
/ok-to-test |
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.
Hi @Ezetowers, thanks for creating the PR.
Overall looks good. Left one small comment.
Co-authored-by: Kensei Nakada <handbomusic@gmail.com>
Hi @sanposhiho, thanks for the quick response!. Comment has been added |
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.
Thanks 👍
/lgtm
/approve
Btw, just for your information, we have KUBE_API_PORT and KUBE_API_HOST env to fix internal kube-apiserver address. (This is not documented yet)
With them, you can directly communicate with internal kube-apiserver via kubectl or client-go to create a lot of resources of your resources in the simulator. It may be helpful for your simulating.
/~https://github.com/kubernetes-sigs/kube-scheduler-simulator/blob/master/config/config.go#L79
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Ezetowers, sanposhiho 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 |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Fixes a race condition in the Store struct located in the resultstore package
Which issue(s) this PR fixes:
There is no issue opened for this bug
Special notes for your reviewer:
I've been using the simulator to test different scheduler configurations starting from a existing cluster status. In order to do that, I am mocking the status of the cluster in the simulator creating equivalent nodes in the original cluster and forcing pods to be placed in the same nodes. Since my clusters have a lot of nodes and pods, I've created some scripts to load the existing cluster and by doing this I've found out a race condition
Steps to reproduce
/label tide/merge-method-squash