mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 23:15:14 +00:00
scheduler: fix shadowing in doSchedule
This commit is contained in:
parent
6a16fe314f
commit
9b7e40570e
@ -321,7 +321,10 @@ func (k *kubeScheduler) doSchedule(task *podtask.T) (string, error) {
|
||||
|
||||
if task.HasAcceptedOffer() {
|
||||
// verify that the offer is still on the table
|
||||
if offer, ok := k.api.offers().Get(task.GetOfferId()); !ok || offer.HasExpired() {
|
||||
var ok bool
|
||||
offer, ok = k.api.offers().Get(task.GetOfferId())
|
||||
|
||||
if !ok || offer.HasExpired() {
|
||||
task.Offer.Release()
|
||||
task.Reset()
|
||||
if err = k.api.tasks().Update(task); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user