-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delete corrupt exist layers when pull image for overlay2 storage driver
If lower layers corrupt with disk full, host or daemon crash or other reasons, may let the layer link and lower file empty in the disk, which can lead new image pull also get an invalid lower file, typically image lower file's content ends with an colon. Despit the image pull success, but can not inspect with error message "Error response from daemon: readlink /var/lib/docker/overlay2/l: invalid argument". So, when pull image check exist layer, can add layer valid check logic. If cause a corrupt layer, delete and pull register it again. Signed-off-by: Jeff Zvier <zvier20@gmail.com>
- Loading branch information
Showing
2 changed files
with
56 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters