Skip to content

base: docker-moby: patch to fsync layer metadata#443

Merged
ricardosalveti merged 1 commit intomasterfrom
fix-docker-issue
Oct 18, 2021
Merged

base: docker-moby: patch to fsync layer metadata#443
ricardosalveti merged 1 commit intomasterfrom
fix-docker-issue

Conversation

@mike-sul
Copy link
Copy Markdown
Contributor

Fsync link and lower layer files just after write operation to make sure their
content is stored on a persistent storage. It helps to overcome
the issue that occurs when image layers download/extraction is
interrupted by a power cut.
Docker daemon can recover if the interrupted layer is "broken",
but it cannot recover if there are two or more lower to the interrupted
layers are "broken". The given fix makes sure that the lower layers that
are fully downloaded and extracted are consistent even if the current
top layer is broken.

Signed-off-by: Mike Sul [email protected]

Fsync `link` and `lower` layer files just after write to make sure their
content is stored on a persistent storage. It helps to overcome
the issue that occurs when image layers download/extraction is
interrupted by a power cut.
Docker daemon can recover if the interrupted layer is "broken",
but it cannot recover if there are two or more lower to the interrupted
layers are "broken". The given fix makes sure that the lower layers that
are fully downloaded and extracted are consistent even if the current
top layer is broken.

Signed-off-by: Mike Sul <[email protected]>
@mike-sul
Copy link
Copy Markdown
Contributor Author

This is CI job https://ci.foundries.io/projects/msul-dev01/lmp/builds/1056/ that built the given change.
I couldn't reproduce the issue with the given patch, @ricardosalveti it would be great if you try this patch for your scenario/steps of the issue reproducing.

Copy link
Copy Markdown
Member

@ricardosalveti ricardosalveti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, will merge and we can do a bit more testing with it.

BTW, this looks like something that upstream should be able to accept, would be good to send a similar change and see what they might think about it.

@ricardosalveti ricardosalveti merged commit 86d0231 into master Oct 18, 2021
@angolini angolini deleted the fix-docker-issue branch February 17, 2022 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants