exec driver: use binding rather than copying to build task directory
- Dominant language
- Go
- Stars
- 17k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 105
Description
nomad: 1.4.2 os: centos7 core:4 mem:8GB
Using exec as the driver to create a job with count of 100, causing the cluster to freeze
Docker, raw_ Docker, these two drivers do not have this issue
using **os.link** and can only link files. The large number of files can cause the machine to freeze. Can we use **os.Symlink** instead
`/client/allocdir/fs_unix.go,`
```
func linkOrCopy(src, dst string, uid, gid int, perm os.FileMode) error {
// Avoid link/copy if the file already exists in the chroot
// TODO 0.6 clean this up. This was needed because chroot creation fails
// when a process restarts.
if fileInfo, _ := os.Stat(dst); fileInfo != nil {
return nil
}
// Attempt to hardlink.
**if err := os.Link(src, dst); err == nil {**
return nil
}
return fileCopy(src, dst, uid, gid, perm)
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.