Skip to content

Commit ce57f8f

Browse files
authored
Merge pull request #3376 from arixmkii/disable-persist-sshfs
Disable ControlPersist for sshfs connections on Windows
2 parents 679f248 + 24dfa16 commit ce57f8f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/hostagent/mount.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ func (a *HostAgent) setupMount(m limayaml.Mount) (*mount, error) {
6868
Readonly: !(*m.Writable),
6969
SSHFSAdditionalArgs: []string{"-o", sshfsOptions},
7070
}
71+
if runtime.GOOS == "windows" {
72+
// cygwin/msys2 doesn't support full feature set over mux socket, this has at least 2 side effects:
73+
// 1. unnecessary pollutes output with error on errors encountered (ssh will try to tolerate them with fallbacks);
74+
// 2. these errors still imply additional coms over mux socket, which resulted sftp-server to fail more often statistically during test runs.
75+
// It is reasonable to disable this on Windows if required feature is not fully operational.
76+
rsf.SSHConfig.Persist = false
77+
}
7178
if err := rsf.Prepare(); err != nil {
7279
return nil, fmt.Errorf("failed to prepare reverse sshfs for %q on %q: %w", resolvedLocation, *m.MountPoint, err)
7380
}

0 commit comments

Comments
 (0)