Commit 9b9e98a2 authored by Jan Safranek's avatar Jan Safranek

Fixed kubelet deleting data from volumes on stop (#7317).

We must not clear the pod directory in killUnwantedPods(), volumes are still mounted there at this time. There already is cleanupOrphanedPodDirs(), called later in the SyncPods() sequence, which should remove these pod directories.
parent 180df8e4
...@@ -1466,12 +1466,6 @@ func (kl *Kubelet) killUnwantedPods(desiredPods map[types.UID]empty, ...@@ -1466,12 +1466,6 @@ func (kl *Kubelet) killUnwantedPods(desiredPods map[types.UID]empty,
glog.Errorf("Failed killing the pod %q: %v", pod.Name, err) glog.Errorf("Failed killing the pod %q: %v", pod.Name, err)
return return
} }
// Remove the pod directory.
err = os.RemoveAll(kl.getPodDir(pod.ID))
if err != nil {
glog.Errorf("Failed removing pod directory for %q", pod.Name)
return
}
}(pod, ch) }(pod, ch)
} }
......
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