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

Fix inability to rename resulting tar on export if /tmp is on another filesystem (tmpfs) #166

Merged
merged 2 commits into from
Feb 26, 2023

Conversation

cubic3d
Copy link
Contributor

@cubic3d cubic3d commented Feb 26, 2023

If the temporary directory is on a different filesystem than the one korb is called from, go's os.Rename function is unable to rename the file, because it would need to be moved (copy actual bytes) between filesystems:

WARN[0010] failed to copy file   component=strategy error="rename /tmp/korb-mover-3168494533 s3-vol.tar: invalid cross-device link" strategy=export

The above error was suppressed by not handling it.

This PR avoids using a potential tmpfs, because of it's possible size restrictions and the requirement to move the resulting file, replaces the deprecated ioutil.TempFile function and enabled error handling on renaming.

@BeryJu BeryJu merged commit 4aae63a into BeryJu:main Feb 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants