-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`sync` system call triggers a full page cache sync which may not always work, especially in kubernetes environment where it is easy to be interfered by others. I have seen several cases where a broken nfs mount is blocking kaniko from doing its job. With `syncfs`, it only writes cache back to disk for the current filesystem that is used by kaniko which is supposed to be more reliable.
- Loading branch information
1 parent
caedb08
commit 71c6800
Showing
3 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
//go:build !linux | ||
// +build !linux | ||
|
||
package snapshot | ||
|
||
const ( | ||
// don't use it at all | ||
SYS_SYNCFS = uintptr(0) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//go:build linux | ||
// +build linux | ||
|
||
package snapshot | ||
|
||
import ( | ||
"golang.org/x/sys/unix" | ||
) | ||
|
||
const ( | ||
SYS_SYNCFS = unix.SYS_SYNCFS | ||
) |