Closed cjreyn closed 1 year ago
@giuseppe PTAL
mount_program = "/bin/fuse-overlayfs"
any reason for using fuse-overlayfs instead of native overlay?
Hi @giuseppe we set it to deal with https://github.com/containers/podman/blob/main/troubleshooting.md#15-rootless-podman-build-fails-when-using-overlayfs
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Running a rootless Centos:7 container with the "Development Tools" group package installed, produces an odd error for certain uid/gid maps. This issue only occurs with overlayfs and user --userns=keep-id. The error is:
Error: error creating container storage: creating an ID-mapped copy of layer "92be6f86914eb84e250d3ee9524503fdc5f2e7d6d92fc272776de15fe55f0844": error during chown: link var/lib/yum/yumdb/a/11022c68e971dbfeaa906d125086652491b1fcbd-apr-util-1.5.2-6.el7-x86_64/command_line var/lib/yum/yumdb/f/cb7e013b0931dc495c9295d40ffbd0f49e31484b-fipscheck-lib-1.4.1-6.el7-x86_64/command_line: no such file or directory: exit status 1
Steps to reproduce the issue:
As root:
Add a new user and group with high ID:
groupadd -g 1214323 podmantest2
adduser -u 1214323 podmantest2
Add user to /etc/subuid and /etc/subgid with offsets:
echo "podmantest2:10000000:65536" >> /etc/subuid
echo "podmantest2:10000000:65536" >> /etc/subgid
Make sure dirs exists
mkdir /run/user/1214323
chown podmantest2:podmantest2 /run/user/1214323
mkdir -p /scratch/podmantest2/podman
chown podmantest2:podmantest2 /scratch/podmantest2/podman
Configure per user podman config: /home/podmantest2/.config/containers/libpod.conf
/home/podmantest/.config/containers/storage.conf
/home/podmantest/.config/containers/containers.conf
Build the example container:
Run the container with --userns=keep-id:
podman run -it --userns=keep-id bugtest
Describe the results you received:
Error: error creating container storage: creating an ID-mapped copy of layer "92be6f86914eb84e250d3ee9524503fdc5f2e7d6d92fc272776de15fe55f0844": error during chown: link var/lib/yum/yumdb/a/11022c68e971dbfeaa906d125086652491b1fcbd-apr-util-1.5.2-6.el7-x86_64/command_line var/lib/yum/yumdb/f/cb7e013b0931dc495c9295d40ffbd0f49e31484b-fipscheck-lib-1.4.1-6.el7-x86_64/command_line: no such file or directory: exit status 1
Describe the results you expected: When running the same container with a different user called "podmantest" which has a uid/gid of 1000, the container starts fine:
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info
:Package info (e.g. output of
rpm -q podman
orapt list podman
orbrew info podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
Virtual machine running Rhel 8.7. Issue also exhibits on Kernel 425.3.1.el8 and other workstations.