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

taildrive: writes do not arrive on a writeable mount #12097

Closed
pitust opened this issue May 10, 2024 · 6 comments · Fixed by #12137
Closed

taildrive: writes do not arrive on a writeable mount #12097

pitust opened this issue May 10, 2024 · 6 comments · Fixed by #12137
Assignees
Labels
bug Bug OS-linux taildrive Issues around taildrive

Comments

@pitust
Copy link

pitust commented May 10, 2024

What is the issue?

When writing to files in taildrive (davfs 1.7.0-2, tailscale 1.66.1) the writes do not ever appear on the remote.

Steps to reproduce

  1. Share a folder with taildrive
  2. Mount the folder with sudo mount -t davfs -o uid=1000,gid=1000 http://100.100.100.100:8080 /mnt/taildrive
  3. Create a file with nonempty contents, e.g. echo hi > /mnt/taildrive/<path>/foo
  4. Observe that these writes do not propagate to the remote although the file itself is created.
  5. After some time, observe the file contents disappearing with an error: taildrive: access: PUT from [hFhH/] to [UQBjF]: status-code=412 ext="unknown" content-type="unknown" content-length=20 tx=5 rx=0 err=""

The entire mechanism in general seems to love traveling back in time, although it is unclear if it is truly tailscale's fault.

Directly writing with -X PUT does appear to work, however; this seems to be tied to the WebDAV If header which is not handler correctly on the server.

Are there any recent changes that introduced the issue?

No response

OS

Linux

OS version

ArchLinux

Tailscale version

1.66.1

Other software

davfs 1.7.0-2

Bug report

BUG-fd8a885f0f6ff803bba155080ca2e2a87503df9e2374760caf3cbe1cebc6792c-20240510210525Z-6bc6c5b062227591

@agottardo
Copy link
Contributor

cc @oxtoacart

@oxtoacart oxtoacart self-assigned this May 11, 2024
@oxtoacart
Copy link
Contributor

I'm not able to reproduce this on the HEAD of main. @pitust I see that your client is Linux with davfs2. What platform is your server running on?

@pitust
Copy link
Author

pitust commented May 12, 2024

@oxtoacart Synology; Tailscale 1.66.0. I can confirm in pcaps that the client acquires a lock and then correctly sends it over peerapi, but the write fails on the remote end with "precondition failed".

@oxtoacart
Copy link
Contributor

@pitust Ahh, sounds like there might be some goofiness with locks. Out of curiosity, if you set use_locks 0 in your davfs2.conf, does the problem go away?

@pitust
Copy link
Author

pitust commented May 14, 2024

@oxtoacart Yes, setting use_locks 0 in davfs2.conf does resolve the issue (although this is not an ideal solution for obvious reasons).

oxtoacart added a commit that referenced this issue May 14, 2024
Temporarily disables support for locking until we reimplement it properly.

Updates #12097

Signed-off-by: Percy Wegmann <percy@tailscale.com>
oxtoacart added a commit that referenced this issue May 14, 2024
Temporarily disables support for locking until we reimplement it properly.

Updates #12097

Signed-off-by: Percy Wegmann <percy@tailscale.com>
oxtoacart added a commit that referenced this issue May 14, 2024
Temporarily disables support for locking until we reimplement it properly.

Updates #12097

Signed-off-by: Percy Wegmann <percy@tailscale.com>
oxtoacart added a commit that referenced this issue May 15, 2024
Fixes #12097

Signed-off-by: Percy Wegmann <percy@tailscale.com>
oxtoacart added a commit that referenced this issue May 15, 2024
Fixes #12097

Signed-off-by: Percy Wegmann <percy@tailscale.com>
oxtoacart added a commit that referenced this issue May 15, 2024
Fixes #12097

Signed-off-by: Percy Wegmann <percy@tailscale.com>
oxtoacart added a commit that referenced this issue May 15, 2024
Updates #12097

Signed-off-by: Percy Wegmann <percy@tailscale.com>
oxtoacart added a commit that referenced this issue May 15, 2024
Fixes #12097

Signed-off-by: Percy Wegmann <percy@tailscale.com>
oxtoacart added a commit that referenced this issue May 15, 2024
Fixes #12097

Signed-off-by: Percy Wegmann <percy@tailscale.com>
oxtoacart added a commit that referenced this issue May 15, 2024
Fixes #12097

Signed-off-by: Percy Wegmann <percy@tailscale.com>
oxtoacart added a commit that referenced this issue May 15, 2024
Fixes #12097

Signed-off-by: Percy Wegmann <percy@tailscale.com>
oxtoacart added a commit that referenced this issue May 15, 2024
Fixes #12097

Signed-off-by: Percy Wegmann <percy@tailscale.com>
oxtoacart added a commit that referenced this issue May 16, 2024
Fixes #12097

Signed-off-by: Percy Wegmann <percy@tailscale.com>
oxtoacart added a commit that referenced this issue May 16, 2024
Fixes #12097

Signed-off-by: Percy Wegmann <percy@tailscale.com>
@oxtoacart
Copy link
Contributor

@pitust This should be resolved on unstable now. Please let me know if it works for you.

Mmx233 pushed a commit to MultiMx/tailscale that referenced this issue May 20, 2024
Fixes tailscale#12097

Signed-off-by: Percy Wegmann <percy@tailscale.com>
@kelivel kelivel added taildrive Issues around taildrive and removed needs-triage labels May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug OS-linux taildrive Issues around taildrive
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants