moby/daemon/graphdriver/overlay2
Mike Sul 1728815648
daemon: overlay2: Write layer metadata atomically
When the daemon process or the host running it is abruptly terminated,
the layer metadata file can become inconsistent on the file system.
Specifically, `link` and `lower` files may exist but be empty, leading
to overlay mounting errors during layer extraction, such as:
"failed to register layer: error creating overlay mount to <path>:
too many levels of symbolic links."

This commit introduces the use of `AtomicWriteFile` to ensure that the
layer metadata files contain correct data when they exist on the file system.

Signed-off-by: Mike <mike.sul@foundries.io>
(cherry picked from commit de2447c2ab)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-23 20:19:13 +02:00
..
check.go graphdriver/overlay2: usingMetacopy ENOTSUP is non-fatal 2023-02-04 00:07:08 -07:00
mount.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
overlay.go daemon: overlay2: Write layer metadata atomically 2023-10-23 20:19:13 +02:00
overlay_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
overlay_unsupported.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00