Browse code

Do not stop daemon from booting if io.EOF on loading image

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 27c23685993ba4252d2d0f8f7ffa6455fb6235c5)

Tibor Vass authored on 2015/11/03 09:05:45
Showing 1 changed files
... ...
@@ -182,7 +182,11 @@ func (graph *Graph) restore() error {
182 182
 		if graph.driver.Exists(id) {
183 183
 			img, err := graph.loadImage(id)
184 184
 			if err != nil {
185
-				return fmt.Errorf("could not restore image %s: %v", id, err)
185
+				if err != io.EOF {
186
+					return fmt.Errorf("could not restore image %s: %v", id, err)
187
+				}
188
+				logrus.Warnf("could not restore image %s due to corrupted files", id)
189
+				continue
186 190
 			}
187 191
 			graph.imageMutex.Lock(img.Parent)
188 192
 			graph.parentRefs[img.Parent]++