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: reservation support allocateOnce #478

Merged

Conversation

saintube
Copy link
Member

@saintube saintube commented Aug 12, 2022

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

Ⅰ. Describe what this PR does

Reservation supports allocateOnce.

Once a pod allocates an available reservation with allocateOnce set to true, the reservation will become Succeeded and no longer allocatable to other owners.

Ⅱ. Does this pull request fix one issue?

fixes #440

Ⅲ. Describe how to verify it

  1. Submit an available reservation with allocateOnce set.
  2. Submit a pod A that matches the reservation.
  3. Watch the reservation is allocated, and its status becomes Succeeded.
  4. Submit another pod B that also matches the reservation (if it is available).
  5. Check if the reservation is not allocatable to pod B.

Ⅳ. 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 eahydra added this to the v0.7 milestone Aug 12, 2022
@codecov
Copy link

codecov bot commented Aug 12, 2022

Codecov Report

Merging #478 (4bb4e04) into main (2f4355e) will increase coverage by 0.09%.
The diff coverage is 74.54%.

@@            Coverage Diff             @@
##             main     #478      +/-   ##
==========================================
+ Coverage   67.98%   68.07%   +0.09%     
==========================================
  Files         149      149              
  Lines       16251    16298      +47     
==========================================
+ Hits        11048    11095      +47     
- Misses       4381     4384       +3     
+ Partials      822      819       -3     
Flag Coverage Δ
unittests 68.07% <74.54%> (+0.09%) ⬆️

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

Impacted Files Coverage Δ
pkg/scheduler/eventhandlers/reservation_handler.go 49.77% <0.00%> (-0.23%) ⬇️
pkg/scheduler/plugins/reservation/hook.go 77.30% <0.00%> (ø)
pkg/scheduler/plugins/reservation/rcache.go 83.25% <0.00%> (ø)
pkg/scheduler/plugins/reservation/utils.go 74.58% <79.54%> (+0.61%) ⬆️
...cheduler/plugins/reservation/garbage_collection.go 82.14% <100.00%> (ø)
pkg/scheduler/plugins/reservation/plugin.go 76.85% <100.00%> (+1.25%) ⬆️
pkg/util/httputil/reverseproxy.go 85.10% <0.00%> (+0.79%) ⬆️
pkg/koordlet/runtimehooks/reconciler/reconciler.go 81.05% <0.00%> (+2.10%) ⬆️

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 add-reservation-allocate-once branch from c00c244 to eccb911 Compare August 12, 2022 03:52
@koordinator-bot koordinator-bot bot added size/L and removed size/M labels Aug 12, 2022
@saintube saintube requested a review from eahydra August 12, 2022 05:03
Copy link
Member

@eahydra eahydra 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: saintube <saintube@foxmail.com>
@koordinator-bot koordinator-bot bot removed the lgtm label Aug 12, 2022
@jasonliu747
Copy link
Member

/lgtm

@eahydra
Copy link
Member

eahydra commented Aug 12, 2022

/lgtm

@hormes
Copy link
Member

hormes commented Aug 12, 2022

/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 f1198e3 into koordinator-sh:main Aug 12, 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.

[proposal] Reservation support allocate once semantics
4 participants