Skip to content

koord-scheduler: support select reservation via reservation affinity#1265

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

koord-scheduler: support select reservation via reservation affinity#1265
koordinator-bot[bot] merged 1 commit intokoordinator-sh:mainfrom
eahydra:support_reservation_affinity

Conversation

@eahydra
Copy link
Member

@eahydra eahydra commented May 5, 2023

Ⅰ. Describe what this PR does

If a pod has an affinity annotation, the pod must be allocated from the reservation, otherwise it stops scheduling.

Ⅱ. Does this pull request fix one issue?

fix #1087 #1256

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

@koordinator-bot koordinator-bot bot requested a review from buptcozy May 5, 2023 04:07
@eahydra
Copy link
Member Author

eahydra commented May 5, 2023

/hold

@codecov
Copy link

codecov bot commented May 5, 2023

Codecov Report

Patch coverage: 38.66% and project coverage change: -0.08 ⚠️

Comparison is base (d9985ea) 65.08% compared to head (11317c8) 65.01%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1265      +/-   ##
==========================================
- Coverage   65.08%   65.01%   -0.08%     
==========================================
  Files         309      309              
  Lines       32520    32589      +69     
==========================================
+ Hits        21167    21188      +21     
- Misses       9813     9858      +45     
- Partials     1540     1543       +3     
Flag Coverage Δ
unittests 65.01% <38.66%> (-0.08%) ⬇️

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

Impacted Files Coverage Δ
pkg/scheduler/frameworkext/interface.go 83.33% <ø> (ø)
pkg/util/reservation/reservation.go 40.76% <0.00%> (-5.52%) ⬇️
pkg/scheduler/frameworkext/framework_extender.go 74.53% <20.00%> (-1.41%) ⬇️
pkg/scheduler/plugins/reservation/plugin.go 85.30% <62.50%> (+0.49%) ⬆️
pkg/scheduler/plugins/reservation/transformer.go 65.06% <74.19%> (+1.38%) ⬆️

... and 3 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 support_reservation_affinity branch from b929fa8 to 3af5c16 Compare May 8, 2023 09:19
Copy link
Member

Choose a reason for hiding this comment

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

When the Pod declares the annotation, does the selection condition of the Reservation for the Pod still take effect?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, still take effect. Reservation.Spec.Owners is currently required. If we abandon this required condition, even if the Pod declares the Reservation Affinity Annotation, some strange usages will appear. For example, it is possible that a Reservation can be freely used by Pods other than the target.

@eahydra eahydra force-pushed the support_reservation_affinity branch from 3af5c16 to 9698a87 Compare May 9, 2023 04:18
@eahydra
Copy link
Member Author

eahydra commented May 9, 2023

/hold cancel
TBR. PTAL @hormes @FillZpp

@eahydra eahydra changed the title koord-scheduler: support reservation affinity koord-scheduler: support select reservation via reservation affinity May 9, 2023
@eahydra eahydra requested review from FillZpp and hormes May 9, 2023 04:20
@eahydra eahydra added this to the v1.3 milestone May 9, 2023
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

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

Signed-off-by: Joseph <joseph.t.lee@outlook.com>
@eahydra eahydra force-pushed the support_reservation_affinity branch from 9698a87 to 11317c8 Compare May 9, 2023 08:42
@koordinator-bot koordinator-bot bot removed the lgtm label May 9, 2023
@FillZpp
Copy link
Member

FillZpp commented May 9, 2023

/lgtm

@koordinator-bot koordinator-bot bot added the lgtm label May 9, 2023
@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

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] koord-scheduler needs to support that Pod can only use resources of Reservation

3 participants