Skip to content
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

Fix opq whiteouts problems for files with dot prefix #17819

Merged
merged 1 commit into from Nov 9, 2015

Conversation

tonistiigi
Copy link
Member

Fixes #17766

Previously, opaque directory whiteouts on non-native
graphdrivers depended on the file order, meaning
files added with the same layer before the whiteout
file .wh..wh..opq were also removed.

If that file happened to have subdirs, then calling
chtimes on those dirs after unpack would fail the pull.

Signed-off-by: Tonis Tiigi tonistiigi@gmail.com

The problem that we don't know if directory is opaque until we reach a subfile is quite problematic to solve safely and efficiently unless we think its acceptable to scan a file twice. Hopefully in the future we can define a more limited specification for the tarball (this has come up with other issues as well) with forced ordering, required parent folders, forbidden duplicate files etc., that would make it a bit more easier.

The current method may not work if files added with the opaque whiteout don't have records for their parent folders, but docker doesn't generate such tarballs.

Fixes moby#17766

Previously, opaque directory whiteouts on non-native
graphdrivers depended on the file order, meaning
files added with the same layer before the whiteout
file `.wh..wh..opq` were also removed.

If that file happened to have subdirs, then calling
chtimes on those dirs after unpack would fail the pull.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@tonistiigi tonistiigi added this to the 1.9.1 milestone Nov 9, 2015
@LK4D4
Copy link
Contributor

LK4D4 commented Nov 9, 2015

Fixed problem for me.
LGTM

@calavera
Copy link
Contributor

calavera commented Nov 9, 2015

LGTM

calavera added a commit that referenced this pull request Nov 9, 2015
Fix opq whiteouts problems for files with dot prefix
@calavera calavera merged commit 69bc4eb into moby:master Nov 9, 2015
@tiborvass tiborvass removed their assignment Nov 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants