New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker load is not atomic #32170
Comments
ping @dmcgowan @tonistiigi |
@cyphar Are you sure that image that caused the problem was created by |
@tonistiigi : I have found a way to reproduce this issue.
I used this same environment as @cyphar |
I'm going to further investigate this this week. |
I make similar observations when using
Starting the daemon with
I can do some detailed debugging tomorrow. |
Alright so this is what the actual error looks like if you do it with a multi-layer image. If you only do it with an image like
So the problem is that the file I'm going to see if I can create a reproducer outside of Docker that causes this same behaviour. It's a bit hard because I can't get the full |
I believe this issue was actually fixed by c37bd10. You still have the problem that new Docker will die if you try to run it on a corrupted |
Thanks @cyphar - I added it to the 1.13 milestone for easier discovery 👍 |
I have this exact same problem on Docker 17.07.0_ce-1.1, OpenSuse. After shutdown, the Docker daemon fails to start with the same error message. Clearing /var/lib/docker makes it start again, until the next restart. The problem appeared after I changed two things:
At the same time, my Docker builds started failing randomly, as described in #33974. Deleting the last intermediate image does not fix this, but changing the Docker file by adding a space somewhere does. |
@dtakken Can you please submit a bug-report to openSUSE's Bugzilla and I can help debug the issue that way? This particular bug was definitely fixed in |
I cannot reproduce this at the moment (we hit it and I had to purge the state once I realised what happened), but it appears that
docker load
is not atomic. If you kill Docker in a certain window during adocker load
operation then you will end up with the metadata for the image being stored without the actual layer data being stored in/var/lib/docker/btrfs/imagedb/
.Here's the debug logs, though they don't tell you much.
This is the actual error that it dies on, which I believe is happening when we call
image.NewImageStore
(duringrestore
) inNewDaemon
.Output of
docker version
:Output of
docker info
:The text was updated successfully, but these errors were encountered: