-
Notifications
You must be signed in to change notification settings - Fork 109
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
Invalid cross-device link #180
Comments
Thank you for reporting! |
First of all, thank you for maintaining this gem.
An error occurred on 0.27.0.
They are not symlinks.
I hope this helps.
|
After few attempts to reproduce it using docker and vagrant I still can't find how "same device" check would be true for temp file path and destination directory. Can you come up with reproducible example/environment? |
We didn't use
It may take some time, but I try to prepare a reproduction environment. |
I created a minimal reproducible example. step 1. start the bash process in an isolated namespace.
step 2. create a temporary directory and mount it as /tmp.
step 3. create a hard link.
step 4. make sure that the same error occurs with optimize_image.
|
Thanks for creating the example! I was able to test that mounting directory from same file system will preserve device id but will create a boundary for creating links. This means that checking |
Thanks for also checking out the |
Can you please check if changes in branch fix-180 fix the problem? |
It works perfectly in |
Released version 0.27.1 |
I'll leave a report for anyone who encounters the same error.
error message
related gems and configuration
systemd is configured to give nginx a private /tmp.
why the error occurred
/var/www/my-app-name/releases/20200909065727/tmp
. (it isRails.root.join('tmp')
)/tmp
when processing the file./var/www/my-app-name/releases/2020090909065727/tmp
and/tmp
have different filesystem namespaces, "Invalid cross-device link" error occurs.our solution
Changed tmp directory path by specifying
ENV['TMPDIR']
in order to use the same tmp directory.Or turn off the
PrivateTmp
feature.The text was updated successfully, but these errors were encountered: