Dear Maintainer,
* What led up to the situation?
I tried to build a container image from scratch with buildah.
* What exactly did you do (or not do) that was effective (or
ineffective)?
I used the default configuration of podman / buildah.
The procedure I use is as follow:
container=$(buildah from scratch)
mountpoint=$(buildah unshare buildah mount $container)
buildah unshare mmdebstrap --variant=minbase --include=tmux,vim trixie $mountpoint trixie.sources.list
# the next part will fails:
buildah unshare buildah umount $container
buildah config --cmd /bin/bash $container
buildah commit -f oci $container debian:13
# the next part will fails
buildah rm $container
* What was the outcome of this action?
It seems there is an issue with overlay graph driver.
It can be trivially reproduced as follow
container=$(buildah from scratch)
mountpoint=$(buildah unshare buildah mount $container)
cd $mountpoint
touch HELLO
cd -
buildah unshare buildah umount $container
You get this error.
Error: error unmounting container "working-container": unmounting build container "72bf36c33f1c8fbecc28e5c481e2a4798aff143fdef01394cfc2ecfdb22d75f5": replacing mount point "/home/skrzynia/.local/share/containers/storage/overlay/d6f81b6236edec4ee0e26c702c8b4f5f21bb660b06d7e753974d7a6a7fed9e03/merged": directory not empty
You have a similar message when trying to remove the container
buildah rm $container
Error: removing container "working-container": deleting build container "72bf36c33f1c8fbecc28e5c481e2a4798aff143fdef01394cfc2ecfdb22d75f5": replacing mount point "/home/skrzynia/.local/share/containers/storage/overlay/d6f81b6236edec4ee0e26c702c8b4f5f21bb660b06d7e753974d7a6a7fed9e03/merged": directory not empty
If removing HELLO file, the container can be unmounted or deleted without issues.
* What outcome did you expect instead?
I should have been able to unmount or delete the working container
* Other informations
- I reproduced the issue with a fresh forky virtual machine too (buildah 1.41.5)
- I don't have the issue with the VFS storage driver, it seems related to overlay.
- as overlay is the default configuration, this bug should be annoying for every user.
This is the output of buildah info:
{
"host": {
"CgroupVersion": "v2",
"Distribution": {
"distribution": "debian",
"version": "13"
},
"MemFree": 18551738368,
"MemTotal": 33570467840,
"OCIRuntime": "runc",
"SwapFree": 40467689472,
"SwapTotal": 40467689472,
"arch": "amd64",
"cpus": 32,
"hostname": "octopus",
"kernel": "6.12.35+deb13-amd64",
"os": "linux",
"rootless": true,
"uptime": "96h 47m 36.04s (Approximately 4.00 days)",
"variant": ""
},
"store": {
"ContainerStore": {
"number": 1
},
"GraphDriverName": "overlay",
"GraphOptions": null,
"GraphRoot": "/home/skrzynia/.local/share/containers/storage",
"GraphStatus": {
"Backing Filesystem": "extfs",
"Native Overlay Diff": "true",
"Supports d_type": "true",
"Supports shifting": "false",
"Supports volatile": "true",
"Using metacopy": "false"
},
"ImageStore": {
"number": 0
},
"RunRoot": "/run/user/1000/containers"
}
}