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

scheduler: add reservation preemption #2139

Conversation

saintube
Copy link
Member

@saintube saintube commented Jul 24, 2024

Ⅰ. Describe what this PR does

  • Support the reservation preemption (Currently, only support a reservation preempt pods).

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

  • Q: Why not adopt the DefaultPreemption?
  • A: We want to support the case where a reservation preempts scheduled pods on a node. Perhaps, support the case where a pod preempts available reservations in the future. However, the DefaultPreemption relies on a real pod of the preemptor to work. In this patch, we leverage the framework's preemption package and overwrite the SelectVictimsOnNode and PodLister of the DefaultPreemption to achieve the reservation preemption.

V. Checklist

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

Copy link

codecov bot commented Jul 24, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 120 lines in your changes missing coverage. Please review.

Project coverage is 67.77%. Comparing base (e1d910a) to head (b5e93b4).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
pkg/scheduler/plugins/reservation/preemption.go 46.45% 66 Missing and 17 partials ⚠️
pkg/scheduler/plugins/reservation/nominator.go 46.80% 19 Missing and 6 partials ⚠️
pkg/scheduler/plugins/reservation/plugin.go 76.00% 3 Missing and 3 partials ⚠️
.../frameworkext/eventhandlers/reservation_handler.go 55.55% 4 Missing ⚠️
pkg/scheduler/frameworkext/reservation_info.go 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2139      +/-   ##
==========================================
- Coverage   67.90%   67.77%   -0.13%     
==========================================
  Files         443      444       +1     
  Lines       41967    42186     +219     
==========================================
+ Hits        28496    28590      +94     
- Misses      11016    11113      +97     
- Partials     2455     2483      +28     
Flag Coverage Δ
unittests 67.77% <50.00%> (-0.13%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@saintube saintube force-pushed the scheduler-add-reservation-preemption branch 7 times, most recently from 1d3465e to e7e8302 Compare July 30, 2024 13:24
@saintube saintube force-pushed the scheduler-add-reservation-preemption branch 7 times, most recently from 3ec6fc9 to 21c293d Compare August 6, 2024 06:16
@saintube saintube force-pushed the scheduler-add-reservation-preemption branch from 39d0f22 to b1d2a25 Compare August 8, 2024 09:24
@saintube
Copy link
Member Author

saintube commented Aug 8, 2024

@ZiMengSheng @hormes The implementation of the reservation ignored can be a large patch. So it is split to another PR.

@saintube saintube force-pushed the scheduler-add-reservation-preemption branch from ad1a640 to ee3bb6e Compare August 9, 2024 04:02
@saintube saintube force-pushed the scheduler-add-reservation-preemption branch 2 times, most recently from 8f5f912 to c601a62 Compare August 19, 2024 03:20
@ZiMengSheng
Copy link
Contributor

/lgtm

@ZiMengSheng
Copy link
Contributor

please give a points list of why we don't use upstream DefaultPreemption in PR Description

@saintube
Copy link
Member Author

please give a points list of why we don't use upstream DefaultPreemption in PR Description

Added.

Signed-off-by: saintube <saintube@foxmail.com>
@saintube saintube force-pushed the scheduler-add-reservation-preemption branch 6 times, most recently from cb539ab to 9450e1a Compare August 28, 2024 03:15
…th deletion

Signed-off-by: saintube <saintube@foxmail.com>
@saintube saintube force-pushed the scheduler-add-reservation-preemption branch from 9450e1a to b5e93b4 Compare August 28, 2024 03:16
@koordinator-bot koordinator-bot bot removed the lgtm label Aug 28, 2024
@ZiMengSheng
Copy link
Contributor

/lgtm

@koordinator-bot koordinator-bot bot added the lgtm label Aug 28, 2024
@ZiMengSheng
Copy link
Contributor

/approve

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

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

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

@koordinator-bot koordinator-bot bot merged commit 396009d into koordinator-sh:main Aug 29, 2024
22 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.

3 participants