Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
A container image is built with a particular sequence of steps where a file with multiple hard links is deleted then recreated. The resulting image generates errors when exported or pushed to a repository. The file has the wrong content when a container is run from this image.
Version-Release number of selected component (if applicable):
- Red Hat Enterprise Linux release 8.2 Beta
from AWS image RHEL-8.2.0_HVM_BETA-20191219-x86_64-0-Hourly2-GP2
- fuse-overlayfs-0.7.2-1.module+el8.2.0+4973+eb529f8e.x86_64
- podman-1.6.4-1.module+el8.2.0+5182+3136e5d4.x86_64
How reproducible:
always
Steps to Reproduce:
1. Create the following Dockerfile in a directory
FROM centos:7
RUN echo foo >/a && ln /a /b
RUN rm /a && echo bar >/a
2. Build a container image from it using podman from a non-root account
podman build -t foo <DIRECTORY>
3. Save the image
podman save -o /dev/null foo
4. Push the image to a Docker repository
podman push foo <REPOSITORY>
5. Run image and check contents of files:
podman run --rm foo cat /a /b
Actual results:
- Steps 3. and 4. both fail with error:
file integrity checksum failed for "a"
- Step 5. returns:
foo
foo
Expected results:
- Steps 3. and 4. should succeed
- Step 5. should return:
bar
foo
Additional info:
The problem does not show up if the same Dockerfile is built from a root account.
The above problem was isolated from an initial real-world example triggered by Python packages installation using pip.
Comment 1Giuseppe Scrivano
2020-03-03 17:12:29 UTC
I doubt it is a duplicate of 1802907 although it is close (both are related to the handling of hard links in fuse-overlayfs)
We were first hit by 1802907 in RHEL 8.1, and that one has been fixed in RHEL 8.2 beta, at least in our use case. This one is present in RHEL 8.2 beta.
As far as I understand, the effect of 1802907 was an incorrect count of hard links returned on just-created, multiply-linked file. This would impact useradd/groupadd, but not other uses of the container.
Here the content of one of the files is wrong, and the container image triggers an error when exported or pushed to a repository.
Comment 3Giuseppe Scrivano
2020-03-04 10:43:38 UTC
I was able to reproduce locally, it was fixed upstream with: https://github.com/containers/fuse-overlayfs/issues/177
We need to backport:
commit f8b554aa9adcd61fb5dfff03528176dbec387c58
Author: Giuseppe Scrivano <gscrivan>
Date: Fri Jan 31 13:46:07 2020 +0100
main: lookup skip ino if there is no origin
if there is no origin xattr specified, do not overwrite the ino
number.
Closes: https://github.com/containers/fuse-overlayfs/issues/177
Signed-off-by: Giuseppe Scrivano <gscrivan>
Test with podman-1.9.3-1.module+el8.2.1+6750+e53a300c.x86_64 with the given steps. And it is works as expect now. So update this to verified.
Details:
Output from step 3,4,5
$ podman save -o /dev/null foo
$ podman push --tls-verify=false foo localhost:5000/mytest/foo
Getting image source signatures
Copying blob 3643e528c4a1 skipped: already exists
Copying blob f0081d431d95 skipped: already exists
Copying blob edf3aa290fb3 [--------------------------------------] 0.0b / 0.0b
Writing manifest to image destination
Storing signatures
$ podman run --rm foo cat /a /b
bar
foo
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2020:3053