Skip to content

Disable ControlPersist for sshfs connections on Windows #3376

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

Merged
merged 1 commit into from
Apr 12, 2025

Conversation

arixmkii
Copy link
Contributor

This dramatically improves stability for sshfs on Windows. It allowed all integration tests to pass in GH actions CI.

I can't state that it doesn't work at all with it enabled - I had some rare successful runs on local machine (never reproduced in GH actions). It also impossible to fully disable mux in other SSH calls of Lima as it will break SSH port forwarder (so, this part definitely works with comms via Unix socket).

Test run is provided in https://github.com/arixmkii/qcw/actions/runs/14022522017/job/39256363831

@AkihiroSuda AkihiroSuda added this to the v1.1.0 milestone Mar 25, 2025
@AkihiroSuda AkihiroSuda requested a review from a team March 25, 2025 05:23
@arixmkii arixmkii mentioned this pull request Mar 30, 2025
@@ -68,6 +68,9 @@ func (a *HostAgent) setupMount(m limayaml.Mount) (*mount, error) {
Readonly: !(*m.Writable),
SSHFSAdditionalArgs: []string{"-o", sshfsOptions},
}
if runtime.GOOS == "windows" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a code comment to the explain the reason

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Description added in code and in the commit message.

Lima recommended OpenSSH distribution on Windows platform has limited
fucntionality over mux socket. Most notably it can't pass FDs over
socket. This results in error messages and internal fallbacks, but
also had higher failure rate during testing. It is reasonable to
disable this for sftp-server communications on Windows to improve
stability.

Signed-off-by: Arthur Sengileyev <[email protected]>
@arixmkii arixmkii force-pushed the disable-persist-sshfs branch from f57b1a0 to 24dfa16 Compare April 12, 2025 12:36
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@AkihiroSuda AkihiroSuda merged commit ce57f8f into lima-vm:master Apr 12, 2025
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants