mirror of https://github.com/docker/docs.git
Merge pull request #17633 from tiborvass/skip-loadimage-error-onrestore
Do not stop daemon from booting if io.EOF on loading image
This commit is contained in:
commit
4eac6d4529
|
@ -182,8 +182,12 @@ func (graph *Graph) restore() error {
|
||||||
if graph.driver.Exists(id) {
|
if graph.driver.Exists(id) {
|
||||||
img, err := graph.loadImage(id)
|
img, err := graph.loadImage(id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if err != io.EOF {
|
||||||
return fmt.Errorf("could not restore image %s: %v", id, err)
|
return fmt.Errorf("could not restore image %s: %v", id, err)
|
||||||
}
|
}
|
||||||
|
logrus.Warnf("could not restore image %s due to corrupted files", id)
|
||||||
|
continue
|
||||||
|
}
|
||||||
graph.imageMutex.Lock(img.Parent)
|
graph.imageMutex.Lock(img.Parent)
|
||||||
graph.parentRefs[img.Parent]++
|
graph.parentRefs[img.Parent]++
|
||||||
graph.imageMutex.Unlock(img.Parent)
|
graph.imageMutex.Unlock(img.Parent)
|
||||||
|
|
Loading…
Reference in New Issue