From 40f5d644118a14df35cc6f6762c3fe638c733118 Mon Sep 17 00:00:00 2001 From: m1093782566 Date: Mon, 15 Aug 2016 12:10:42 +0800 Subject: [PATCH] update comment info when scheduler bind fails Change-Id: Idce89003fe408b713431d07a3300e3acd1af87a9 --- plugin/pkg/scheduler/scheduler.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/plugin/pkg/scheduler/scheduler.go b/plugin/pkg/scheduler/scheduler.go index eab0c922bb2..1729d33497e 100644 --- a/plugin/pkg/scheduler/scheduler.go +++ b/plugin/pkg/scheduler/scheduler.go @@ -111,12 +111,8 @@ func (s *Scheduler) scheduleOne() { // Optimistically assume that the binding will succeed and send it to apiserver // in the background. - // The only risk in this approach is that if the binding fails because of some - // reason, scheduler will be assuming that it succeeded while scheduling next - // pods, until the assumption in the internal cache expire (expiration is - // defined as "didn't read the binding via watch within a given timeout", - // timeout is currently set to 30s). However, after this timeout, the situation - // will self-repair. + // If the binding fails, scheduler will release resources allocated to assumed pod + // immediately. assumed := *pod assumed.Spec.NodeName = dest if err := s.config.SchedulerCache.AssumePod(&assumed); err != nil {