mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 23:15:14 +00:00
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.
This commit is contained in:
parent
180df8e4e1
commit
9b9e98a22f
@ -1466,12 +1466,6 @@ func (kl *Kubelet) killUnwantedPods(desiredPods map[types.UID]empty,
|
||||
glog.Errorf("Failed killing the pod %q: %v", pod.Name, err)
|
||||
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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user