Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[24.0 backport] daemon: overlay2: Write layer metadata atomically #46703

Merged
merged 1 commit into from Oct 24, 2023

Commits on Oct 23, 2023

  1. 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 de2447c)
    Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    mike-sul authored and thaJeztah committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    57bd388 View commit details
    Browse the repository at this point in the history