Skip to content

Commit

Permalink
review comments kubernetes#2
Browse files Browse the repository at this point in the history
  • Loading branch information
Adhityaa Chandrasekar committed Jul 8, 2020
1 parent 5593d96 commit 39d7b2c
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,27 +131,26 @@ NormalizeScore extension point.

### Reserve {#reserve}

A reserve plugin implements two methods, namely Reserve and Unreserve, to serve
A Reserve plugin implements two methods, namely Reserve and Unreserve, to serve
as informational extension points. Plugins which maintain runtime state (aka
"stateful plugins") should use these extension points to be notified by the
scheduler when resources on a node are being reserved and unreserved for a given
Pod.

The Reserve extension point, which is the penultimate step of the scheduling
cycle, is triggered before the scheduler actually binds the Pod to the
The Reserve phase happens before the scheduler actually binds the Pod to the
designated node. It exists to prevent race conditions while the scheduler waits
for the bind to succeed. The Reserve method of each reserve plugin may succeed
for the bind to succeed. The Reserve method of each Reserve plugin may succeed
or fail; if one plugin fails, subsequent plugins are not executed and the
extension point is considered to have failed. If all plugins' Reserve methods
succeed, the extension point is considered to be successful and the rest of the
scheduling cycle and the binding cycle are executed.

The Unreserve method of a reserve plugin is executed if the Reserve extension
The Unreserve method of a Reserve plugin is executed if the Reserve extension
point fails or if the Pod was reserved and then rejected in a later phase. When
this happens, the Unreserve method of **all** reserve plugins will be executed
this happens, the Unreserve method of **all** Reserve plugins will be executed
in the reverse order of Reserve calls. It exists to clean up the state
associated with the reserved Pod. The implementation of Unreserve method in
reserve plugins must be idempotent and may not fail.
Reserve plugins must be idempotent and may not fail.

### Permit

Expand All @@ -164,14 +163,14 @@ the three things:

1. **deny** \
If any Permit plugin denies a Pod, it is returned to the scheduling queue.
This will trigger the Unreserve method in [reserve plugins](#reserve).
This will trigger the Unreserve method in [Reserve plugins](#reserve).

1. **wait** (with a timeout) \
If a Permit plugin returns "wait", then the Pod is kept in an internal "waiting"
Pods list, and the binding cycle of this Pod starts but directly blocks until it
gets approved. If a timeout occurs, **wait** becomes **deny**
and the Pod is returned to the scheduling queue, triggering the
Unreserve method in [reserve plugins](#reserve).
Unreserve method in [Reserve plugins](#reserve).

{{< note >}}
While any plugin can access the list of "waiting" Pods and approve them
Expand Down

0 comments on commit 39d7b2c

Please sign in to comment.