scheduler: support prefer node hint#2787
scheduler: support prefer node hint#2787saintube wants to merge 1 commit intokoordinator-sh:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2787 +/- ##
==========================================
+ Coverage 67.91% 67.94% +0.03%
==========================================
Files 513 513
Lines 52283 52345 +62
==========================================
+ Hits 35509 35568 +59
- Misses 13724 13727 +3
Partials 3050 3050
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
e114581 to
7eca9a3
Compare
|
A very useful building block. However, I'd like to understand the queue component's requirements for us:
|
7eca9a3 to
1fed6a7
Compare
|
Co-authored-by: shenxin <rougang.hrg@alibaba-inc.com> Signed-off-by: saintube <saintube@foxmail.com>
1fed6a7 to
2fcc579
Compare
Ⅰ. Describe what this PR does
Make the koord-scheduler support the scheduling hint of the preferred nodes.
Introduce the
PreferNodesPluginin the FrameworkExtender, allowing the plugin to provide a node list that the scheduling pipeline first tries to filter before entering the regularfindNodesThatPassFilters. It introduces the overhead of once RunFilterPluginsWithNominatedPlugins, which should be acceptable.In contrast to the
.status.nominatedNodeName, the hint uses a list of nodes, and the hinted pods do not account for the nodes before assuming.Compatibilty:
When the user also enables the network-topology-aware scheduling and generates the PreFilterResult by the FindOneNode plugin according to the best plan, the preference hint is ignored.
The SchedulingHint plugin also considers the intersection of the original PreFilterResult. When the preferred nodes are not included in the PreFilterResult, the scheduler does not break the constraint of the existing PreFilter, but aborts the hint instead.
Ⅱ. Does this pull request fix one issue?
In the scenario of job queueing, the queue component may have some suggestions about which nodes the dequeued pods should try to schedule first. The patch adds the api for the queue to hint the scheduler for the preferred node when it does not want the pod to be counted on the nominated node before the scheduler predicates. We hint at a node list instead of a single node, which serves as a backup in case the most preferred one fails for some reason.
Ⅲ. Describe how to verify it
Ⅳ. Special notes for reviews
V. Checklist
make test