Skip to content

koord-scheduler: support Reservation allocate policy#1291

Merged
koordinator-bot[bot] merged 1 commit intokoordinator-sh:mainfrom
eahydra:optimize_restore_reservation_s3
May 23, 2023
Merged

koord-scheduler: support Reservation allocate policy#1291
koordinator-bot[bot] merged 1 commit intokoordinator-sh:mainfrom
eahydra:optimize_restore_reservation_s3

Conversation

@eahydra
Copy link
Member

@eahydra eahydra commented May 13, 2023

Ⅰ. Describe what this PR does

Support Reservation allocate policy

  1. The policies Aligned and Restricted support Pod only allocates from one Reservation instance and node.
  2. If a node has multiple Reservations with Aligned or Restricted policies, and these Reservations cannot satisfy the pod’s request at all during filtering, the node will be filtered out.
  3. The default policy (currently is none) cannot coexist with the policies Aligned and Restricted.
  4. Deprecated the constraint about Reservation.Spec.Owners during filter, so the Pods can allocate from resources via more than one Reservations. If the result is not expected, users should set the Reservation.Spec.AllocatePolicy with Aligned or Restricted.
  5. Currently, the implementation of AllocatePolicy does not support the port reservation scenario

Ⅱ. Does this pull request fix one issue?

fix #1226

Ⅲ. 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

@eahydra
Copy link
Member Author

eahydra commented May 13, 2023

/hold waiting for #1284 and #1290

@codecov
Copy link

codecov bot commented May 13, 2023

Codecov Report

Patch coverage: 69.63% and project coverage change: +0.06 🎉

Comparison is base (f34368f) 64.73% compared to head (6bf30be) 64.79%.

❗ Current head 6bf30be differs from pull request most recent head 363200d. Consider uploading reports for the commit 363200d to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1291      +/-   ##
==========================================
+ Coverage   64.73%   64.79%   +0.06%     
==========================================
  Files         319      317       -2     
  Lines       33215    33331     +116     
==========================================
+ Hits        21501    21597      +96     
- Misses      10148    10169      +21     
+ Partials     1566     1565       -1     
Flag Coverage Δ
unittests 64.79% <69.63%> (+0.06%) ⬆️

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

Impacted Files Coverage Δ
pkg/scheduler/plugins/deviceshare/service.go 38.46% <ø> (ø)
pkg/scheduler/plugins/reservation/plugin.go 66.77% <16.17%> (-15.37%) ⬇️
pkg/scheduler/plugins/reservation/transformer.go 68.18% <62.50%> (+0.43%) ⬆️
pkg/scheduler/plugins/deviceshare/plugin.go 65.42% <76.92%> (-1.43%) ⬇️
pkg/scheduler/plugins/deviceshare/reservation.go 81.36% <84.61%> (+1.36%) ⬆️
pkg/scheduler/plugins/deviceshare/allocator.go 87.50% <100.00%> (ø)
pkg/scheduler/plugins/deviceshare/device_cache.go 88.59% <100.00%> (+0.52%) ⬆️
.../scheduler/plugins/deviceshare/device_resources.go 87.73% <100.00%> (+11.44%) ⬆️

... and 17 files with indirect coverage changes

☔ 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 optimize_restore_reservation_s3 branch 7 times, most recently from 48b61f5 to bc24215 Compare May 18, 2023 04:17
@eahydra
Copy link
Member Author

eahydra commented May 18, 2023

/hold cancel

@eahydra eahydra added this to the v1.3 milestone May 18, 2023
@eahydra eahydra force-pushed the optimize_restore_reservation_s3 branch from bc24215 to 6e853ae Compare May 18, 2023 07:35
@eahydra
Copy link
Member Author

eahydra commented May 18, 2023

@eahydra eahydra force-pushed the optimize_restore_reservation_s3 branch 2 times, most recently from 6bf30be to 2d95419 Compare May 19, 2023 02:46
@eahydra eahydra requested a review from hormes May 19, 2023 03:25
Signed-off-by: Joseph <joseph.t.lee@outlook.com>
@eahydra eahydra force-pushed the optimize_restore_reservation_s3 branch from 2d95419 to 363200d Compare May 22, 2023 11:14
@hormes
Copy link
Member

hormes commented May 22, 2023

/lgtm

Copy link
Member

@FillZpp FillZpp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

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

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 4aa30c1 into koordinator-sh:main May 23, 2023
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.

[proposal]Reservations support two modes: preferred or required

3 participants