Description of problem:
When using oc-mirror to perform disk to mirror by specifying a tar ball on an NFS disk, the unlinkat errors below will cause the command crash on the publish phase. This is the same result when performed by the same user. unlinkat oc-mirror-workspace/images.1221714546/layout/blobs/sha256: directory not empty unlinkat oc-mirror-workspace/images.1221714546/layout/blobs/sha256: directory not empty unlinkat oc-mirror-workspace/images.1221714546/layout/blobs/sha256: directory not empty unlinkat oc-mirror-workspace/images.1221714546/layout/blobs/sha256: directory not empty goroutine 1 [running]: k8s.io/klog/v2/internal/dbg.Stacks(0x0) /go/src/github.com/openshift/oc-mirror/vendor/k8s.io/klog/v2/internal/dbg/dbg.go:35 +0x85 k8s.io/klog/v2.(*loggingT).output(0x767fda0, 0x3, 0x0, 0xc00017d260, 0x1, {0x5f4f07c?, 0x7f74f8c71108?}, 0x10?, 0x0) /go/src/github.com/openshift/oc-mirror/vendor/k8s.io/klog/v2/klog.go:941 +0x6ba k8s.io/klog/v2.(*loggingT).printDepth(0xc000fa2120?, 0x25?, 0x0, {0x0, 0x0}, 0xc002388000?, {0xc0007e7d40, 0x1, 0x1}) /go/src/github.com/openshift/oc-mirror/vendor/k8s.io/klog/v2/klog.go:714 +0x1bb
Version-Release number of selected component (if applicable):
$ oc version Client Version: 4.16.8 Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3 $ oc mirror version WARNING: This version information is deprecated and will be replaced with the output from --short. Use -- output=yaml|json to get the full version. Client Version: version.Info{Major:"", Minor:"", GitVersion:"4.16.0- 202408090908.p0.g819f011.assembly.stream.el9-819f011", GitCommit:"819f0115e4be3f55ed7d4edae1c38035811771ae", GitTreeState:"clean", BuildDate:"2024-08-09T09:59:47Z", GoVersion:"go1.21.11 (Red Hat 1.21.11-1.module+el8.10.0+21986+2112108a) X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}
How reproducible:
Always
Steps to Reproduce:
1. Mirroring from mirror to NFS disk 2. Mirroring from NFS disk to mirror 3.
Actual results:
oc-mirror fails with unlinkat errors
Expected results:
oc-mirror completes successfully
Additional info:
I believe it is caused by .nfsXXXXX files remaining in the directory on the NFS disk. https://nfs.sourceforge.net/#faq_d2