Skip to content
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

koord-scheduler: enhanced reservation scheduling #1139

Merged
merged 4 commits into from
Apr 6, 2023

Conversation

eahydra
Copy link
Member

@eahydra eahydra commented Mar 25, 2023

Ⅰ. Describe what this PR does

Enhanced reservation scheduling.

  1. Weaken the restriction of the matching strategy, and select the Reservation only based on whether the Owner matches.
  2. After the PreFilter, the resources reserved by the Reservation are returned uniformly.
  3. Supports filtering invalid Reservations in Reserve phase , such as Reservations that have no remaining resources, or Reservations that have AllocateOnce enabled and Pods have been allocated, or Reservations deemed invalid by other plugins.
  4. To further simplify the implementation of multiple stages such as reserve/unreserve/prebind, we have abstracted a separate Controller that is responsible for updating the state of the Reservation. This makes the entire Pod scheduling process simpler and more reliable.
  5. When AllocateOnce=false, a new constraint is added: only one Reservation with the same Owner can be scheduled on the same node, and when returning the resources reserved by the Reservation (with AllocateOnce=false), only the one with the earliest creation time is selected.

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

V. Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests
  • All checks passed in make test

@codecov
Copy link

codecov bot commented Mar 25, 2023

Codecov Report

Patch coverage: 67.56% and project coverage change: -0.57 ⚠️

Comparison is base (dc360a6) 66.29% compared to head (59e2357) 65.72%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1139      +/-   ##
==========================================
- Coverage   66.29%   65.72%   -0.57%     
==========================================
  Files         280      290      +10     
  Lines       30317    30339      +22     
==========================================
- Hits        20099    19941     -158     
- Misses       8783     8946     +163     
- Partials     1435     1452      +17     
Flag Coverage Δ
unittests 65.72% <67.56%> (-0.57%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...lugins/reservation/controller/node_eventhandler.go 0.00% <0.00%> (ø)
pkg/util/reservation/reservation.go 46.28% <29.85%> (-28.04%) ⬇️
.../scheduler/plugins/reservation/pod_eventhandler.go 40.62% <40.62%> (ø)
...plugins/reservation/controller/pod_eventhandler.go 40.84% <40.84%> (ø)
...ugins/reservation/controller/garbage_collection.go 55.55% <55.55%> (ø)
pkg/scheduler/plugins/reservation/eventhandler.go 60.86% <60.86%> (ø)
pkg/scheduler/plugins/reservation/nominator.go 61.90% <61.90%> (ø)
...reservation/controller/reservation_eventhandler.go 69.23% <69.23%> (ø)
pkg/scheduler/plugins/reservation/transformer.go 65.07% <69.90%> (-0.17%) ⬇️
...duler/plugins/reservation/controller/controller.go 74.71% <74.71%> (ø)
... and 8 more

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@eahydra eahydra force-pushed the enhanced_reservation branch 6 times, most recently from e7ab068 to d955c26 Compare April 2, 2023 13:31
@eahydra eahydra requested a review from tzzcfrank April 3, 2023 04:14
@eahydra eahydra requested a review from saintube April 3, 2023 10:07
@eahydra eahydra requested a review from saintube April 3, 2023 15:57
@saintube
Copy link
Member

saintube commented Apr 4, 2023

/lgtm

@ZiMengSheng
Copy link
Contributor

/lgtm

@tzzcfrank
Copy link
Contributor

/lgtm

@koordinator-bot
Copy link

@tzzcfrank: changing LGTM is restricted to collaborators

In response to this:

/lgtm

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.

@eahydra
Copy link
Member Author

eahydra commented Apr 6, 2023

/approve

@hormes hormes added the approved label Apr 6, 2023
@hormes
Copy link
Member

hormes commented Apr 6, 2023

/approve

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eahydra, hormes

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Signed-off-by: Joseph <joseph.t.lee@outlook.com>
Signed-off-by: Joseph <joseph.t.lee@outlook.com>
Signed-off-by: Joseph <joseph.t.lee@outlook.com>
Signed-off-by: Joseph <joseph.t.lee@outlook.com>
@FillZpp
Copy link
Member

FillZpp commented Apr 6, 2023

/lgtm

@koordinator-bot koordinator-bot bot added the lgtm label Apr 6, 2023
@koordinator-bot koordinator-bot bot merged commit 5c3a0a3 into koordinator-sh:main Apr 6, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants