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

Spurious files in a directory deleted in upper layer #136

Closed
msimacek opened this issue Oct 30, 2019 · 0 comments
Closed

Spurious files in a directory deleted in upper layer #136

msimacek opened this issue Oct 30, 2019 · 0 comments

Comments

@msimacek
Copy link

Given a directory structure:

/dir1/dir2/foo

when dir1 gets removed and then in another layer dir1 and dir1/dir2 get recreated, the file foo is not correctly hidden as it should be. This seems to be an extension of the problem reported in containers/podman#3021, which is marked as fixed, but it only seems to be fixed for the case when the file is in the deleted directory. When the file is in a subdirectory of the deleted directory, the issue is still present.

It can be reproduced using podman by building the following Dockerfile and checking for existence of the file foo using podman run as unpriviledged user.

FROM busybox

RUN mkdir -p /dir1/dir2
RUN touch /dir1/dir2/foo
RUN rm -r /dir1
RUN mkdir -p /dir1/dir2

There are actually two variants of the problem.

  1. With the dockerfile above, the whole dir1 gets marked with a whiteout file.
  2. When the above dockerfile is altered so that the last two RUN instructions are merged into one, dir1 gets marked as opaque (this only occurs when building with docker, not buildah).

fuse-overlayfs seems to handle both cases incorrectly, whereas kernel overlay works as expected (using podman as root or using docker)

giuseppe added a commit to giuseppe/fuse-overlayfs that referenced this issue Oct 31, 2019
Closes: containers#136

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
giuseppe added a commit to giuseppe/fuse-overlayfs that referenced this issue Oct 31, 2019
Closes: containers#136

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
giuseppe added a commit to giuseppe/fuse-overlayfs that referenced this issue Oct 31, 2019
Closes: containers#136

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
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

No branches or pull requests

1 participant