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

Create a troubleshooting entry for the lock error message #4325

Closed
shcheklein opened this issue Aug 3, 2020 · 12 comments · Fixed by #4721
Closed

Create a troubleshooting entry for the lock error message #4325

shcheklein opened this issue Aug 3, 2020 · 12 comments · Fixed by #4721
Labels
enhancement Enhances DVC good first issue hacktoberfest p2-medium Medium priority, should be done, but less important ui user interface / interaction

Comments

@shcheklein
Copy link
Member

shcheklein commented Aug 3, 2020

From time to time users are getting a message like this:

ERROR: cannot perform the command because another DVC process seems to be running on this project. If that is not the case, manually remove .dvc/tmp/lock and try again.

(and even removing .dvc/tmp/lock doesn't help in this case)

when they run DVC on some Network fs (NFS, Lustre, etc).

Example: https://discordapp.com/channels/485586884165107732/563406153334128681/727222314080665682

Usually solution is simple and user needs to enable the core.hardlink_lock, but it's hard to get that from the error message.

To save us and users time we should create a troubleshooting entry and include link to the error message.

@triage-new-issues triage-new-issues bot added the triage Needs to be triaged label Aug 3, 2020
@efiop efiop added enhancement Enhances DVC p3-nice-to-have It should be done this or next sprint ui user interface / interaction labels Aug 3, 2020
@triage-new-issues triage-new-issues bot removed the triage Needs to be triaged label Aug 3, 2020
@moinnadeem
Copy link

I'm getting this issue; how would I enable the core.hardlink_lock?

@efiop
Copy link
Contributor

efiop commented Sep 24, 2020

@moinnadeem

dvc config core.hardlink_lock true

https://dvc.org/doc/command-reference/config 🙂

@shcheklein
Copy link
Member Author

@moinnadeem hi! just to clarify and make sure that this ticket is the right one- have you tried to remove the .dvc/tmp/lock file (first make sure that no DVC commands are running) first? Do you use NFS or Lustre or some other network/distributed file system?

@moinnadeem
Copy link

@shcheklein Yes, and yes! I'm on a networked filesystem that doesn't allow file-level locking either. Using hardlinking solved it!

I appreciate the quick response!

@shcheklein
Copy link
Member Author

@moinnadeem perfect! :) thanks for clarifying.

@shcheklein shcheklein added p2-medium Medium priority, should be done, but less important and removed p3-nice-to-have It should be done this or next sprint labels Sep 24, 2020
@harsh8398
Copy link
Contributor

Hi @shcheklein I would like to take this issue. Could you please assign it to me? Also, where is this troubleshooting entry supposed to be added?

@shcheklein
Copy link
Member Author

@harsh8398 sure! feel free to work on this. Here is the place https://dvc.org/doc/user-guide/troubleshooting . Here is the guide on how to deal with the docs updates - https://dvc.org/doc/user-guide/contributing/docs

@jorgeorpinel
Copy link
Contributor

Hi!

Usually solution is simple and user needs to enable the core.hardlink_lock, but it's hard to get that from the error message.

so should the error message in this repo also improve a little? (and link to the new troubleshooting anchor in docs)

@harsh8398
Copy link
Contributor

@shcheklein I'm having trouble with tests/func/test_lock.py::test_cli test case. The test case uses assert FAILED_TO_LOCK_MESSAGE in caplog.text check. The issue is that the FAILED_TO_LOCK_MESSAGE contains link with ascii escape codes added using one of the utility functions format_link() whereas the caplog.text only has the printed text which doesn't have the escape codes. So the test case will check two different strings and fail.

I am thinking to add assert statement for URL only like assert TROUBLESHOOTING_URL in caplog.text. Any suggestions? Thanks in advance 🙂.

@shcheklein
Copy link
Member Author

@efiop @pmrowla @pared @skshetry could you please help @harsh8398 with the tests here ^^ 🙏

@pared
Copy link
Contributor

pared commented Oct 14, 2020

@harsh8398
I am very sorry for such a long time to respond.

As you might see in other our tests, we are usually duplicating the error messages that we want to check.
For example:

assert expected_warning in caplog.text

So in this case, what would be sufficient, would be to create the expected message and verify it is showing up in caplog.text.

@harsh8398
Copy link
Contributor

Thanks @pared for your help. 🙂

@shcheklein I've raised the PR with the changes!

harsh8398 added a commit to harsh8398/dvc that referenced this issue Oct 15, 2020
efiop pushed a commit that referenced this issue Oct 19, 2020
* lock: added troubleshooting doc link in error message (#4325)

* updated lock error message (#4325)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhances DVC good first issue hacktoberfest p2-medium Medium priority, should be done, but less important ui user interface / interaction
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants