• Kubernetes Submit Queue's avatar
    Merge pull request #37698 from jsafrane/remove-all-filesystems · d14854fd
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue (batch tested with PRs 41139, 41186, 38882, 37698, 42034)
    
    Make kubelet never delete files on mounted filesystems
    
    With bug #27653, kubelet could remove mounted volumes and delete user data.
    The bug itself is fixed, however our trust in kubelet is significantly lower.
    Let's add an extra version of RemoveAll that does not cross mount boundary
    (rm -rf --one-file-system).
    
    It calls lstat(path) three times for each removed directory - once in
    RemoveAllOneFilesystem and twice in IsLikelyNotMountPoint, however this way
    it's platform independent and the directory that is being removed by kubelet
    should be almost empty.
    d14854fd
BUILD 3.04 KB