-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
Init cache with assigned non-terminated pods before scheduling #45453
Conversation
/cc @bsalamat |
I'm going to add some test for it. |
why not wait |
reasonable, let me check the detail of Informer. |
5908108#diff-77bdee21550bc698bfa654de11c64324L455 I think it will never return because the corresponding controller is not started. |
Thanks for the comments, addressed. |
Tested in local cluster by following steps:
The reason is that we did not wait for cache to be synced by before scheduling, so the running pods may not be added into cache when scheduling. We did not need to wait for unassigned tasks, scheduler will get it one by one to dispatch. |
/lgtm Thanks for the fix, Klaus! |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: bsalamat, k82cn Assign the PR to them by writing
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Done
I can do some check today and append comments here. |
@ncdc / @timothysc , just check the kcm: each controller call |
@k82cn Scheduler seems use the sharedInformerFactory for other resources like |
Good point! I'll add logic to handle it. We did not add it into informer factory because the ListerWatcher is customized (un-assigned, non-terminated). |
Automatic merge from submit-queue (batch tested with PRs 45453, 45307, 44987) |
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged): fixes #45220Release note: