-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Unexpected error when cache and artifacts are not on the same partition on SSH #2704
Comments
@mslapek it looks like a bug to me. Could you please share DVC indeed copies files (or utilizes I'll check if |
@mslapek , as @shcheklein mentioned, you can use workspace=$(mktemp -d)
cache=$(mktemp -d)
sudo systemctl start sshd
dvc init --no-scm
dvc remote add workspace ssh://localhost/${workspace}
dvc remote add cache ssh://localhost/${cache}
dvc remote modify cache type symlink
dvc config cache.ssh cache
echo "foo" > ${workspace}/foo
dvc add remote://workspace/foo By the way, thanks a lot for the interest in contributing! 😃 |
@MrOutis thanks! It looks Failure to add a file (even with default copy semantic) still looks like a bug to me. |
Chnging the cache type seems like a correct solution/workaround to this scenario, but could the |
I've added reproduce script to the issue inspired by @MrOutis script. @shcheklein here is output for
|
@MrOutis I've tried the script from issue with proposed Unfortunately, it still raises unexpected error. (the difference from your script is in creation of separate partition for cache) |
Got it, @mslapek. I see the problem now, the |
@mslapek , you can try with the following patch: #2709 It works for me. Same scenario as before but this time across two partitions:
workspace=$(mktemp -d)
cache=$(mktemp -d -p /mnt/misc)
sudo systemctl start sshd
dvc init --no-scm
dvc remote add workspace ssh://localhost/${workspace}
dvc remote add cache ssh://localhost/${cache}
dvc config cache.ssh cache
echo "foo" > ${workspace}/foo
dvc add remote://workspace/foo |
@MrOutis while you are on it could you check if |
@MrOutis also, please confirm that symlinks do work in this case indeed so that we can update our docs. |
@shcheklein, agree 😅
Will do. |
@shcheklein , symlinks works: $ ls $workspace
foo -> //mnt/misc/tmp.5ClPQUCWr7/d3/b07384d113edec49eaa6238ad5ff00 |
@shcheklein after you enable them with |
@shcheklein , yes :) |
Glad to see that my first issue on GitHub was labelled as p0-critical bug 🎉. @MrOutis I tried the scenario with your patch - it works 😊 (tried with default settings and I think that the issue might be closed after merge. |
Setup
pip
installed, version 0.66.1.Platform: Ubuntu 18.04
Steps to reproduce
cache
, and configure it as SSH cache.test.txt
to this dir.workspace
.dvc add remote://workspace/test.txt -f test.dvc
.Bash script reproducing error:
Observed behavior
Expected behavior
I believe that by design DVC should raise error in this case - in order to avoid implicit movement of large files between partitions.
However, the error message should suggest solution:
Some people might by mistake put file to different partition (it happened to me! - such message could save me a bit of time 😉).
Because I had already debugged/studied
--verbose
DVC to understand the source of the problem, I could try to implement such message through Pull Request.The text was updated successfully, but these errors were encountered: