Fix scheduler misc

This commit is contained in:
astraw99 2022-09-03 23:37:59 +08:00
parent e7192a4955
commit ee24513e47
4 changed files with 4 additions and 4 deletions

View File

@ -35,7 +35,7 @@ var (
// New returns a Cache implementation.
// It automatically starts a go routine that manages expiration of assumed pods.
// "ttl" is how long the assumed pod will get expired.
// "ttl" is how long the assumed pod will get expired, "0" means pod will never expire.
// "stop" is the channel that would close the background goroutine.
func New(ttl time.Duration, stop <-chan struct{}) Cache {
cache := newCache(ttl, cleanAssumedPeriod, stop)

View File

@ -447,8 +447,7 @@ func (p *PriorityQueue) flushBackoffQCompleted() {
break
}
pod := rawPodInfo.(*framework.QueuedPodInfo).Pod
boTime := p.getBackoffTime(rawPodInfo.(*framework.QueuedPodInfo))
if boTime.After(p.clock.Now()) {
if p.isPodBackingoff(rawPodInfo.(*framework.QueuedPodInfo)) {
break
}
_, err := p.podBackoffQ.Pop()

View File

@ -98,6 +98,7 @@ func (v *cfgValidator) validate(cfg config.KubeSchedulerProfile, f framework.Fra
for _, plCfg := range cfg.PluginConfig {
if plCfg.Name == queueSort {
queueSortArgs = plCfg.Args
break
}
}
if len(v.queueSort) == 0 {

View File

@ -195,7 +195,7 @@ func (sched *Scheduler) schedulingCycle(ctx context.Context, state *framework.Cy
metrics.PodScheduleError(fwk.ProfileName(), metrics.SinceInSeconds(start))
reason = v1.PodReasonSchedulerError
}
// One of the plugins returned status different than success or wait.
// One of the plugins returned status different from success or wait.
fwk.RunReservePluginsUnreserve(ctx, state, assumedPod, scheduleResult.SuggestedHost)
if forgetErr := sched.Cache.ForgetPod(assumedPod); forgetErr != nil {
klog.ErrorS(forgetErr, "Scheduler cache ForgetPod failed")