4a014e6b0d
Issue Description: * 1. Saving more than one images, `docker save -o a.tar aaa bbb` * 2. Delete the last image which in saving progress. `docker rmi bbb` Espected: Saving images operation shouldn't be disturbed. But the real result is that failed to save image and get an error as below: `Error response from daemon: open /var/lib/docker/image/devicemapper/imagedb/content/sha256/7c24e4d533a76e801662ad1b7e6e06bc1204f80110b5623e96ba2877c51479a1: no such file or directory` Analysis: 1. While saving more than one images, it will get all the image info from reference/imagestore, and then using the `cached data` to save the images to a tar file. 2. But this process doesn't have a resource lock, if a deletion operation comes, the image will be deleted, so saving operation will fail. Solution: When begin to save an image, `Get` all the layers first. then the deletion operation won't delete the layers. Signed-off-by: Wentao Zhang <zhangwentao234@huawei.com> |
||
---|---|---|
.. | ||
cache | ||
spec | ||
tarexport | ||
v1 | ||
fs.go | ||
fs_test.go | ||
image.go | ||
image_test.go | ||
rootfs.go | ||
store.go | ||
store_test.go |