Closed ffromani closed 3 years ago
shadow-utils use xattrs, I think it can be a kernel regression.
Could you try the reproducer here: https://github.com/containers/buildah/issues/3071#issuecomment-796070354 ?
shadow-utils use xattrs, I think it can be a kernel regression.
Could you try the reproducer here: containers/buildah#3071 (comment) ?
$ uname -a
Linux musashi2.rokugan.lan 5.10.22-200.fc33.x86_64 #1 SMP Tue Mar 9 22:05:08 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ unshare -r unshare -r sh -c 'touch /tmp/setxattr-test; setcap "cap_setuid=ep" /tmp/setxattr-test' && echo ok
Failed to set capabilities on file `/tmp/setxattr-test' (Invalid argument)
usage: setcap [-h] [-q] [-v] [-n <rootid>] (-r|-|<caps>) <filename> [ ... (-r|-|<capsN>) <filenameN> ]
Note <filename> must be a regular (non-symlink) file.
-r remove capability from file
- read capability text from stdin
<capsN> cap_from_text(3) formatted file capability
-h this message and exit status 0
-q quietly
-v validate supplied capability matches file
-n <rootid> write a user namespace limited capability
--license display the license info
so IIUC it fails like on F34 and so it seems a regression, or at least a breaking change indeed.
Not sure if relevant: both my /home
and /tmp
fs are ext4.
yes, it is a regression in the kernel and we cannot do anything about it.
The only workaround I am aware of is to specify a different mapping:
podman build --userns-uid-map 0:1:65535 --userns-gid-map 0:1:65535 ....
Does it work for you?
I am closing the issue because it is not a bug in Podman/Buildah that we can address, but we discuss the problem further here
thanks @giuseppe , makes sense and I agree to close this issue.
@fatherlinux FYI issue running ubi image
If this is a kernel regression, do you maybe have a link to a proper Fedora bug? I would prefer if this blocked the F34 release :)
If this is a kernel regression, do you maybe have a link to a proper Fedora bug? I would prefer if this blocked the F34 release :)
we only had a discussion here: https://github.com/containers/buildah/issues/3071
I am not aware of any bugzilla to track it
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
I routinely build container images for my operator (https://github.com/openshift-kni/performance-addon-operators/) as unprivileged user on my fedora 33 (stock podman/containers packages). One of these containers (must-gather) wants to install RPMs into a ubi (https://www.redhat.com/en/blog/introducing-red-hat-universal-base-image) base image. Lately the process fails with
Can't pinpoint the failure to a specific update. No changes into the Dockerfile:
No changes into the user config
Steps to reproduce the issue:
make && make must-gather-container
Describe the results you received: container build fails as shown below
Describe the results you expected: container build succeds, or at very least the error message helps me understand the actual issue?
Additional information you deem important (e.g. issue happens only occasionally):
podman run -ti registry.access.redhat.com/ubi8/ubi-minimal:latest -- /bin/bash
and thenmicrodnf install -y shadow-utils
everything works as expectedOutput of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
latest version - tested the latest packaged version troubleshooting guide - yes, not sure if uidmap is related, didn't change a thing.
podman system migrate
didn't helpAdditional environment details (AWS, VirtualBox, physical, etc.): this happens on a up to date fedora 33