Openshift: Using `emptydir` (tmpfs) for cache breaks builds
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 10.3k
- Forks
- 1.5k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 48
Description
In Openshift 4.11.46 using buildkitd v0.12 and fuse-overlayfs:
For performance reasons I tried to use tmpfs as buildkit cache:
volumeMounts:
- name: buildkitd-cache-mem
mountPath: /home/user/.local/share/buildkit
volumes:
- name: buildkitd-cache-mem
emptyDir:
medium: Memory
sizeLimit: 100Gi`
This leads to mysterious errors such as
11:39:51 > [stage-1 2/5] RUN dnf install tftp-server tftp -y && dnf clean all:
11:39:51 3.224 Error: Cannot rename directory "/var/cache/dnf/rpm-rhel8-codeready-remote-e1af419ca1d84a02/tmpdir.CRc2cz/repodata" to "/var/cache/dnf/rpm-rhel8-codeready-remote-e1af419ca1d84a02/repodata": cannot create directory /var/cache/dnf/rpm-rhel8-codeready-remote-e1af419ca1d84a02/repodata: File exists
which reproducibly go away when switching to a PVC.
Any thoughts on what might be causing this? Thanks
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Start by reproducing the failure with the OpenShift 4.11.46, buildkitd v0.12, fuse-overlayfs, and emptyDir configuration, then compare it with the PVC case while examining the /home/user/.local/share/buildkit cache mount. Done means identifying why tmpfs produces the dnf rename error and documenting or validating a resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- build-system, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100