Commit 265db191 authored by Seth Jennings's avatar Seth Jennings

skip WaitForAttachAndMount for terminated pods in syncPod

parent 2c624e59
...@@ -1542,11 +1542,14 @@ func (kl *Kubelet) syncPod(o syncPodOptions) error { ...@@ -1542,11 +1542,14 @@ func (kl *Kubelet) syncPod(o syncPodOptions) error {
return err return err
} }
// Wait for volumes to attach/mount // Volume manager will not mount volumes for terminated pods
if err := kl.volumeManager.WaitForAttachAndMount(pod); err != nil { if !kl.podIsTerminated(pod) {
kl.recorder.Eventf(pod, v1.EventTypeWarning, events.FailedMountVolume, "Unable to mount volumes for pod %q: %v", format.Pod(pod), err) // Wait for volumes to attach/mount
glog.Errorf("Unable to mount volumes for pod %q: %v; skipping pod", format.Pod(pod), err) if err := kl.volumeManager.WaitForAttachAndMount(pod); err != nil {
return err kl.recorder.Eventf(pod, v1.EventTypeWarning, events.FailedMountVolume, "Unable to mount volumes for pod %q: %v", format.Pod(pod), err)
glog.Errorf("Unable to mount volumes for pod %q: %v; skipping pod", format.Pod(pod), err)
return err
}
} }
// Fetch the pull secrets for the pod // Fetch the pull secrets for the pod
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment