diff --git a/contrib/mesos/pkg/scheduler/plugin.go b/contrib/mesos/pkg/scheduler/plugin.go index d7a6d77aa73..0bbf03f300c 100644 --- a/contrib/mesos/pkg/scheduler/plugin.go +++ b/contrib/mesos/pkg/scheduler/plugin.go @@ -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 {