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: remove allocated in filter hook #918

Merged

Conversation

KunWuLuan
Copy link
Member

Currently, the resource reservation plugin doesn't subtract allocated resources from the reservepod after allocating resources to the pod, which will lead to fewer available resources on the nodes.

For example, a reservation reserved 2c on node and the reservation allocated 1c to pod. In this case available resource on node is allocated-2c instead of allocated-3c.

@KunWuLuan KunWuLuan force-pushed the remove-allocated-resources branch 3 times, most recently from fb23fb5 to 61c3793 Compare January 3, 2023 09:33
@KunWuLuan KunWuLuan force-pushed the remove-allocated-resources branch 2 times, most recently from dae355c to ea11418 Compare January 9, 2023 09:43
@codecov
Copy link

codecov bot commented Jan 9, 2023

Codecov Report

Base: 66.66% // Head: 66.60% // Decreases project coverage by -0.06% ⚠️

Coverage data is based on head (a8e1d4b) compared to base (59b7e90).
Patch coverage: 65.62% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #918      +/-   ##
==========================================
- Coverage   66.66%   66.60%   -0.07%     
==========================================
  Files         240      243       +3     
  Lines       27769    28119     +350     
==========================================
+ Hits        18513    18728     +215     
- Misses       7987     8106     +119     
- Partials     1269     1285      +16     
Flag Coverage Δ
unittests 66.60% <65.62%> (-0.07%) ⬇️

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

Impacted Files Coverage Δ
pkg/scheduler/plugins/reservation/hook.go 77.00% <59.25%> (-2.17%) ⬇️
pkg/scheduler/plugins/reservation/rcache.go 89.21% <100.00%> (+0.04%) ⬆️
pkg/koordlet/util/node.go 11.23% <0.00%> (-30.44%) ⬇️
.../webhook/pod/validating/request_limit_validator.go 71.84% <0.00%> (-23.20%) ⬇️
pkg/koordlet/audit/event_logger.go 65.53% <0.00%> (-3.98%) ⬇️
pkg/koordlet/runtimehooks/reconciler/reconciler.go 65.88% <0.00%> (-1.18%) ⬇️
...dlet/statesinformer/states_noderesourcetopology.go 63.76% <0.00%> (-0.79%) ⬇️
pkg/util/httputil/reverseproxy.go 84.30% <0.00%> (-0.54%) ⬇️
...duler/plugins/elasticquota/quota_overuse_revoke.go 70.05% <0.00%> (-0.53%) ⬇️
pkg/scheduler/plugins/reservation/plugin.go 80.43% <0.00%> (-0.40%) ⬇️
... and 25 more

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 at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@eahydra eahydra changed the title remove allocated in filter hook koord-scheduler: remove allocated in filter hook Jan 9, 2023
@eahydra
Copy link
Member

eahydra commented Jan 9, 2023

@KunWuLuan thanks for your contribution. please add more unit tests for the cases.

Signed-off-by: KunWuLuan <kunwuluan@gmail.com>
@saintube
Copy link
Member

/lgtm

@hormes
Copy link
Member

hormes commented Jan 10, 2023

/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 5ec567a into koordinator-sh:main Jan 10, 2023
FillZpp pushed a commit that referenced this pull request Jan 16, 2023
Signed-off-by: KunWuLuan <kunwuluan@gmail.com>
lucming pushed a commit to lucming/koordinator that referenced this pull request Feb 8, 2023
Signed-off-by: KunWuLuan <kunwuluan@gmail.com>
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.

4 participants