-
Notifications
You must be signed in to change notification settings - Fork 604
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
Don't cache sshfs directory, fixes abiosoft/colima#99 #538
Conversation
Signed-off-by: Randy Fay <[email protected]>
Signed-off-by: Randy Fay <[email protected]>
c9f5ca3
to
e807f2d
Compare
It is not clear to me that this is the best option. Reading the osxfuse wiki page for this claims that you need to pair So I guess I would like to see some explanation why we would choose one options over the other. |
Thanks for the good thinking and link. I tried out the other options, but something was wrong with my testing, so I'll go back to it again and see what I can sort out. |
I tried each combination as suggested in docs
Bottom line is that the PR as it is is the only one that prevents this issue. |
I am facing the same (or similar) issue running Terraform in a pod with I do not remember facing this issue on RD <0.7.0. I wonder if there was any sshfs related changes in 0.7.0 or 0.7.1? |
I am able to reproduce this with a simple
Each time it's a new set of files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bottom line is that the PR as it is is the only one that prevents this issue.
Thanks! In that case I guess this is the way we have to go, and hope that 9p support will arrive soon. Leaving final decision to merge to @AkihiroSuda
@@ -41,7 +42,7 @@ func (a *HostAgent) setupMount(ctx context.Context, m limayaml.Mount) (*mount, e | |||
return nil, err | |||
} | |||
// NOTE: allow_other requires "user_allow_other" in /etc/fuse.conf | |||
sshfsOptions := "allow_other" | |||
sshfsOptions := "allow_other,cache=no" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This option seems specific to sshfs v2?
https://github.com/libfuse/sshfs/blob/ef3870a99710447a1c9219c6fcfce34bc5ab9760/sshfs.1.in#L67
Doesn't seem supported in sshfs v3 (not documented, at least)
https://github.com/libfuse/sshfs/blob/master/sshfs.rst
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ubuntu dpkg has really weird versioning scheme.. not sure whether we are using v3 or v2 🤷♂️
https://pkgs.org/download/sshfs
sshfs_3.6.0+repack+really2.10-0ubuntu1_amd64.deb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v3 seems to have undocumented support for cache=no
, so LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
This was changed to `false` in lima 0.8.0: * lima-vm#538 It has generated multiple reports of breaking PHP package manager, unit tests, and file system access itself: * lima-vm#556 * abiosoft/colima#129 * rancher-sandbox/rancher-desktop#1349 Signed-off-by: Jan Dubois <[email protected]>
sshfs caching can cause asynchronous behaviors that aren't very happy, as discussed in https://stackoverflow.com/questions/3671350/any-way-to-eliminate-time-lag-with-sshfs
This adds the
cache=no
option to sshfs mounts to prevent this issueIn my case, a ddev test was adding a bunch of files to a mounted directory before starting a container that bind-mounted them. On the way up, it tried to access those files inside the container and got interesting behaviors where the files were listable, but not yet readable. SO
but
and of course a
cp -r
would fail.