Merge pull request #71212 from cofyc/fix71068

Clear pod binding cache
This commit is contained in:
k8s-ci-robot 2018-11-21 05:58:10 -08:00 committed by GitHub
commit 9801572181
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)