Skip to content

gofer: Support restore of deleted files whose original path is occupied. #11785

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

Merged
merged 1 commit into from
Jun 6, 2025

Conversation

copybara-service[bot]
Copy link

gofer: Support restore of deleted files whose original path is occupied.

It is possible that the application can open an FD to a file, delete the file,
create another file at that path and then checkpoint the container. In such a
scenario, our gofer restore logic will fail with EEXIST because a file already
exists on the host at that location when we try to recreate it.

Use a temporary filename to recreate the file in such a scenario. This file is
deleted again anyways.

Fixes #11425

@copybara-service copybara-service bot added the exported Issue was exported automatically label Jun 3, 2025
@copybara-service copybara-service bot force-pushed the test/cl766720146 branch 3 times, most recently from 52cd6d3 to a18f019 Compare June 6, 2025 23:16
It is possible that the application can open an FD to a file, delete the file,
create another file at that path and then checkpoint the container. In such a
scenario, our gofer restore logic will fail with EEXIST because a file already
exists on the host at that location when we try to recreate it.

Use a temporary filename to recreate the file in such a scenario. This file is
deleted again anyways.

Fixes #11425

PiperOrigin-RevId: 768263262
@copybara-service copybara-service bot merged commit e3c4c4c into master Jun 6, 2025
0 of 2 checks passed
@copybara-service copybara-service bot deleted the test/cl766720146 branch June 6, 2025 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exported Issue was exported automatically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Checkpoint fails for containers with deleted-but-open files in --overlay2=none mode
1 participant