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-descheduler: fix object limiter by move it to reconciler #2088

Conversation

songtao98
Copy link
Contributor

@songtao98 songtao98 commented Jun 6, 2024

Ⅰ. Describe what this PR does

The arbitrator relies on golang's rate.Limiter package to implement workload-level eviction limter. However, only when the MigrationController evicts a pod successfully, the limiter's tokens will be consumed. That leads to a high possibility that the number of PodMigrationJob passes the arbitration is more than objectLimiter's upper bound, so that we cannot really limit the number of pods being evicted inside a timewindow.

This PR moves the objectlimiter from arbitrator to reconciler. Thus it can be checked based on the real number.

Ⅱ. Does this pull request fix one issue?

fixes #2074

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

Copy link

codecov bot commented Jun 6, 2024

Codecov Report

Attention: Patch coverage is 70.93023% with 25 lines in your changes missing coverage. Please review.

Project coverage is 68.66%. Comparing base (ae25a92) to head (7fa537d).

Files Patch % Lines
...kg/descheduler/controllers/migration/controller.go 73.49% 14 Missing and 8 partials ⚠️
pkg/descheduler/controllers/migration/evict.go 0.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2088      +/-   ##
==========================================
+ Coverage   68.65%   68.66%   +0.01%     
==========================================
  Files         430      430              
  Lines       40056    40078      +22     
==========================================
+ Hits        27499    27520      +21     
+ Misses      10192    10188       -4     
- Partials     2365     2370       +5     
Flag Coverage Δ
unittests 68.66% <70.93%> (+0.01%) ⬆️

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.

@songtao98 songtao98 force-pushed the fix_object_limiter_arbitration_bug branch 3 times, most recently from 42c21e9 to 513a270 Compare June 7, 2024 03:31
@songtao98 songtao98 changed the title koord-descheduler: fix object limiter by revalidating before pod eviction koord-descheduler: fix object limiter by move it to reconciler Jun 7, 2024
@songtao98 songtao98 force-pushed the fix_object_limiter_arbitration_bug branch from 513a270 to 96f7d53 Compare June 7, 2024 09:00
@koordinator-bot koordinator-bot bot added size/XL and removed size/L labels Jun 7, 2024
@songtao98 songtao98 force-pushed the fix_object_limiter_arbitration_bug branch 4 times, most recently from 2f80906 to b7414ba Compare June 14, 2024 06:59
@songtao98 songtao98 force-pushed the fix_object_limiter_arbitration_bug branch 2 times, most recently from 9e98f5c to bc45a0b Compare June 14, 2024 16:45
Signed-off-by: songtao98 <songtao2603060@gmail.com>
@songtao98 songtao98 force-pushed the fix_object_limiter_arbitration_bug branch from bc45a0b to 7fa537d Compare June 14, 2024 16:46
@ZiMengSheng
Copy link
Contributor

/lgtm

@hormes
Copy link
Member

hormes commented Jun 17, 2024

/approve

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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

@koordinator-bot koordinator-bot bot merged commit 8e25776 into koordinator-sh:main Jun 17, 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.

[BUG] koord-descheduler: objectLimiter.workload doesn't work
3 participants