Clear pod binding cache.

This commit is contained in:
Yecheng Fu 2018-11-21 11:24:53 +08:00
parent 7ba79c3183
commit 8fc00ebda6

View File

@ -400,6 +400,10 @@ func (sched *Scheduler) bindVolumes(assumed *v1.Pod) error {
klog.Errorf("scheduler cache ForgetPod failed: %v", forgetErr)
}
// Volumes may be bound by PV controller asynchronously, we must clear
// stale pod binding cache.
sched.config.VolumeBinder.DeletePodBindings(assumed)
reason = "VolumeBindingFailed"
eventType = v1.EventTypeWarning
sched.config.Error(assumed, err)