• Kubernetes Submit Queue's avatar
    Merge pull request #55641 from sjenning/remove-corrupt-checkpoints · b983cee8
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
    
    dockershim: remove corrupt checkpoints immediately upon detection
    
    Fixes https://github.com/kubernetes/kubernetes/issues/55620
    
    The current checkpoint abstraction leaks the handling of corrupt checkpoints to the user.
    
    If the user does a `GetCheckpoint()` and the checkpoint is corrupt, the corrupt checkpoint is returned to the user (why??) with an error indicating the corruption.  It is then up to the user to detect the corruption via the error msg and call `RemoveCheckpoint()` to remove the corrupted checkpoint.
    
    The checkpoint abstraction should not expose corruption to the user.  If it is corrupt, it is as good as not found to the user.  The checkpoint code should handle cleanup of corrupt entries and report "not found" to the user.
    
    @derekwaynecarr @eparis @dcbw @freehan
    b983cee8
.golint_failures 31.6 KB