Skip to content

koord-scheduler: fix stale reservation status#474

Merged
koordinator-bot[bot] merged 1 commit intokoordinator-sh:mainfrom
saintube:fix-reservation-failover
Aug 11, 2022
Merged

koord-scheduler: fix stale reservation status#474
koordinator-bot[bot] merged 1 commit intokoordinator-sh:mainfrom
saintube:fix-reservation-failover

Conversation

@saintube
Copy link
Member

@saintube saintube commented Aug 11, 2022

Signed-off-by: saintube saintube@foxmail.com

Ⅰ. Describe what this PR does

Fix stale reservation statuses when pod failed to bind on reserved node or scheduler restarts unexpectedly.

Ⅱ. Does this pull request fix one issue?

fixes #468

Ⅲ. Describe how to verify it

  1. Start the koord-scheduler.
  2. Submit an available reservation R.
  3. Submit a pod P that allocates reserved resources.
  4. Stop the koord-scheduler.
  5. Delete the pod P.
  6. Restart the koord-scheduler.
  7. Wait about 1 minute and verify if the reservation status is corrected.

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

@codecov
Copy link

codecov bot commented Aug 11, 2022

Codecov Report

Merging #474 (9273a32) into main (ce27726) will increase coverage by 0.24%.
The diff coverage is 72.61%.

@@            Coverage Diff             @@
##             main     #474      +/-   ##
==========================================
+ Coverage   67.13%   67.37%   +0.24%     
==========================================
  Files         143      146       +3     
  Lines       15166    15646     +480     
==========================================
+ Hits        10181    10542     +361     
- Misses       4223     4310      +87     
- Partials      762      794      +32     
Flag Coverage Δ
unittests 67.37% <72.61%> (+0.24%) ⬆️

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

Impacted Files Coverage Δ
apis/extension/scheduling.go 0.00% <0.00%> (ø)
pkg/scheduler/plugins/reservation/plugin.go 75.60% <65.35%> (-3.71%) ⬇️
pkg/scheduler/plugins/reservation/utils.go 73.96% <81.81%> (+1.03%) ⬆️
...cheduler/plugins/reservation/garbage_collection.go 82.14% <82.60%> (-7.05%) ⬇️
pkg/scheduler/plugins/reservation/rcache.go 83.25% <84.76%> (+21.02%) ⬆️
...dlet/statesinformer/states_noderesourcetopology.go 60.61% <0.00%> (-6.79%) ⬇️
.../webhook/pod/validating/request_limit_validator.go 94.64% <0.00%> (-2.68%) ⬇️
pkg/scheduler/plugins/nodenumaresource/plugin.go 70.11% <0.00%> (-1.18%) ⬇️
... and 10 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@saintube saintube force-pushed the fix-reservation-failover branch from f38b5b0 to b96bef5 Compare August 11, 2022 12:22
Signed-off-by: saintube <saintube@foxmail.com>
@saintube saintube force-pushed the fix-reservation-failover branch from b96bef5 to 9273a32 Compare August 11, 2022 12:31
@hormes
Copy link
Member

hormes commented Aug 11, 2022

/lgtm
/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

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 08529a1 into koordinator-sh:main Aug 11, 2022
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] The reservation status can be incorrect or stale

2 participants