mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 02:34:03 +00:00
scheduler: add err check for procurement
This commit is contained in:
parent
eee551c451
commit
9bbfc35fa9
@ -341,7 +341,11 @@ func (k *kubeScheduler) doSchedule(task *podtask.T, err error) (string, error) {
|
||||
}
|
||||
|
||||
task.Offer = offer
|
||||
k.api.algorithm().Procurement()(task, details) // TODO(jdef) why is nothing checking the error returned here?
|
||||
if err := k.api.algorithm().Procurement()(task, details); err != nil {
|
||||
offer.Release()
|
||||
task.Reset()
|
||||
return "", err
|
||||
}
|
||||
|
||||
if err := k.api.tasks().Update(task); err != nil {
|
||||
offer.Release()
|
||||
|
Loading…
Reference in New Issue
Block a user