Don't restore image if layer does not exist

Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 6903ca89af71d40aeaa0277dab13d3dc6dd801a7
Component: engine
This commit is contained in:
John Howard
2018-02-13 11:51:01 -08:00
parent 069181a5f7
commit 39948932b1
+4
View File
@@ -79,6 +79,10 @@ func (is *store) restore() error {
}
l, err = is.lss[img.OperatingSystem()].Get(chainID)
if err != nil {
if err == layer.ErrLayerDoesNotExist {
logrus.Errorf("layer does not exist, not restoring image %v, %v, %s", dgst, chainID, img.OperatingSystem())
return nil
}
return err
}
}