Skip to content

Commit

Permalink
Return Error instead of UnschedulableAndUnresolvable in PreFilter
Browse files Browse the repository at this point in the history
Signed-off-by: utam0k <[email protected]>
  • Loading branch information
utam0k committed Nov 9, 2023
1 parent d00246b commit f6e7f4c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/scheduler_plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,11 @@ func (pl *KubeThrottler) PreFilter(
if len(thrInsufficient) != 0 {
reasons = append(reasons, fmt.Sprintf("throttle[%s]=%s", schedulev1alpha1.CheckThrottleStatusInsufficient, strings.Join(throttleNames(thrInsufficient), ",")))
}
return nil, framework.NewStatus(framework.UnschedulableAndUnresolvable, reasons...)

// TODO(utam0k): Returns a more appropriate type.
// If PreFilter returns Unschedulable or UnschedulableAndUnresolvable, preemption will occur.
// ref: https://github.com/kubernetes/kubernetes/blob/8a9b209cb11943f4d53a0d840b55cf92ebfbe004/pkg/scheduler/schedule_one.go#L452-L468
return nil, framework.NewStatus(framework.Error, reasons...)
}

func (pl *KubeThrottler) Reserve(
Expand Down

0 comments on commit f6e7f4c

Please sign in to comment.