-
Notifications
You must be signed in to change notification settings - Fork 232
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
Using mountopt metacopy=on results in build layers that include everything beneath #640
Comments
@rhvgoyal FYI |
I don't believe this is true? Could you give me an easy reporoducer? I am running podman on a container, then I do a podman commit. podman image tree shows me something that looks like:
|
I don't know why it works for you and doesn't work for me. I'm using btrfs, so maybe that has something to do with it. I tested 4 configs, and for me it was only broken when running as root with
|
Just for completeness could you give us the podman info command. |
Another thought, is, this breakage because of BTRFS being the underlying file system versus xfs or ext4. |
@joelsmith Are you still having this problem? |
Yes, if I use
|
I can reproduce the error @joelsmith is seeing. buildah v1.12.0 uses storage v1.15.3, and at image-commit-time it generates a layer diff by mounting both the child layer and the parent layer, and then walking the two mounted directories to compute the diff. When the overlay driver computes the mount options to specify in order to mount the parent layer, because it's being asked to mount the parent layer read-only, it omits the parent layer's "diff" directory from the list of directories that are specified in the mount options. This is wrong because the set of directories that it's left specifying amount to mounting the parent layer's parent layer instead, and as a result buildah gets a diff of the child layer relative to that. It looks like we broke it in 1.13.1 and accidentally stopped triggering the bug just before v1.15.8: #519 stopped changing which lists of layers we used for the mountpoint by forcing #628 added back code to toggle |
@joelsmith @nalin was this ever fixed? Can we close this? |
Hi, what's the status here? |
#1314 should fix this. |
When running buildah on my system, new build layers included everything from layers beneath. When I do a
podman save
and extract the contents of the two layers, diff shows that most of the files in the two layers are identical. The new layer is slightly larger than the old layer.@nalind helped me track it down to the
metacopy=on
mountopt
. Removing it fixed the issue for me. Here's what he had to say on slack:buildah info output:
I'm on Fedora 30 with podman-1.8.0-4.fc30.x86_64 and buildah-1.12.0-2.fc30.x86_64
The text was updated successfully, but these errors were encountered: