Skip to content

An offline workspace with a file sync session is accessed using coder ssh if config-ssh was run #590

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

Closed
ethanndickson opened this issue Apr 23, 2025 · 3 comments · Fixed by coder/coder-desktop-macos#144
Assignees

Comments

@ethanndickson
Copy link
Member

ethanndickson commented Apr 23, 2025

The latest coder config-ssh creates an SSH config item that fallsback to coder ssh if the Coder Connect hostname is unavailable. This means if a file sync session exists for a workspace that's currently offline, rather than failing to connect, Mutagen uses the SSH config and attempts to connect to that workspace using coder ssh, this in-turn automatically starts the workspace, and then when the Mutagen operation times out, cancels the build.

These are the Mutagen logs relayed via the Coder Desktop logs:

2025-04-23 14:17:14.123009 [E] [sync.sync_43eBU5AW.beta] Workspace was stopped, starting workspace to allow connecting to "pog11"...
2025-04-23 14:17:15.717849 [E] [sync.sync_43eBU5AW.beta] Planning workspace...
2025-04-23 14:17:15.955351 [E] [sync.sync_43eBU5AW.beta] === ✔ Queued [0ms]
2025-04-23 14:17:15.955395 [E] [sync.sync_43eBU5AW.beta] ==> ⧗ Running
2025-04-23 14:17:15.955401 [E] [sync.sync_43eBU5AW.beta] ==> ⧗ Running
2025-04-23 14:17:17.340596 [E] [sync.sync_43eBU5AW.beta] === ✔ Running [14ms]
2025-04-23 14:17:17.340645 [E] [sync.sync_43eBU5AW.beta] ==> ⧗ Setting up
2025-04-23 14:17:17.340654 [E] [sync.sync_43eBU5AW.beta] === ✔ Setting up [71ms]
2025-04-23 14:17:17.340668 [E] [sync.sync_43eBU5AW.beta] ==> ⧗ Detecting persistent resources
2025-04-23 14:17:17.911125 [E] [sync.sync_43eBU5AW.beta] Connection timed out during banner exchange
2025-04-23 14:17:34.113115 [E] [sync.sync_43eBU5AW.beta] Workspace was stopped, starting workspace to allow connecting to "pog11"...
2025-04-23 14:17:35.837161 [E] [sync.sync_43eBU5AW.beta] Planning workspace...

One way to fix this might be to patch our Mutagen build to ignore the SSH config. This should be fine as nobody should ever need or want to customize the SSH config used by the file sync connection.

This was observed on Mac, but presumably occurs on Windows too.

@sreya sreya self-assigned this Apr 23, 2025
@ibetitsmike ibetitsmike assigned ibetitsmike and unassigned sreya Apr 23, 2025
@ibetitsmike
Copy link

ibetitsmike commented Apr 23, 2025

  1. Consider the option of using env variables when making the connection to mark the session as mutagen.
  2. Go with the solution to create an option to specify a new ssh config for mutagen.

@matifali
Copy link
Member

Or let us make mutagen in Coder Desktop work exclusively on Coder Connect tunnel and not fallback to CLI i.e. coder ssh.

@ethanndickson
Copy link
Member Author

ethanndickson commented Apr 23, 2025

That's what's accomplished by the second option above, creating an option on Mutagen to specify the SSH config to use.

ethanndickson added a commit to coder/mutagen that referenced this issue May 1, 2025
…ble (#4)

Relates to coder/internal#590

I've tested this manually, and within Coder Desktop macOS, by setting `MUTAGEN_SSH_CONFIG_PATH` to `none`.

From the man page for `ssh(1)`:
```
-F configfile
    [...] If set to “none”, no configuration files will be read.
```

Subsequent PRs for the Desktop apps will use the new Mutagen version (0.18.3), and specify `MUTAGEN_SSH_CONFIG_PATH=none`
ethanndickson added a commit to coder/coder-desktop-macos that referenced this issue May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants