containerd / containerd/nerdctl
Add timeout operation to the commit command
- Dominant language
- Go
- Stars
- 10.4k
- Forks
- 826
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 44
Description
### What is the problem you're trying to solve
When I use the commit command to solidify a larger container, I sometimes get the following two errors
```
time="2024-07-27T15:43:59+08:00" level=fatal msg="failed to apply diff: failed to Lchown \"/data/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/2451/fs/root/StableDiffusionWebui/models/Stable-diffusion/anyloracleanlinearmix_v10.safetensors\" for UID 41230, GID 35958: lchown /data/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/2451/fs/root/StableDiffusionWebui/models/Stable-diffusion/anyloracleanlinearmix_v10.safetensors: no such file or directory: unknown"
time="2024-07-27T04:37:07+08:00" level=fatal msg="failed to export layer: mount callback failed on /data/lib/containerd/tmpmounts/containerd-mount473897779: mount callback failed on /data/lib/containerd/tmpmounts/containerd-mount173139494: failed to commit: rename /data/lib/containerd/io.containerd.content.v1.content/ingest/688c185f9520117c8809ffd7aee84a13df27f40413dcc22d38e831298de1be24/data /data/lib/containerd/io.containerd.content.v1.content/blobs/sha256/3fd8dde64d3990376572b0db6aaae3b0dde8116908b02a4e52f6c0dcf0dea040: no such file or directory: unknown"
```
After looking at the code, I found that this is because the lease time in the code is set to 1 hour, and if it times out, some of the generated files are cleaned up by the gc operation

### Describe the solution you'd like
I can only recompile the project after modifying the code, I would appreciate it if you could add an option to set the lease timeout period!
### Additional context
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.