fix: add ProxyCommand retry wrapper for sleep/wake reconnection#872
Open
fix: add ProxyCommand retry wrapper for sleep/wake reconnection#872
Conversation
After sleep/wake, DNS resolution often fails transiently (systemd-resolved not ready). When `coder ssh` fails instantly, the Remote SSH extension sees unparsable output and throws a permanent SshResolverError.Create(), showing "Reload Window" instead of retrying. This wraps the ProxyCommand with a POSIX shell retry script that retries up to 10 times with 5s delays on quick failures (<10s runtime). The 5s sleep is long enough for the machine to fully suspend during it, so when it wakes, sleep returns immediately and the next retry succeeds with DNS working.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
systemd-resolvednot ready). Whencoder sshfails instantly, the Remote SSH extension sees unparsable output and throws a permanentSshResolverError.Create(), showing "Reload Window" instead of retrying.sleepreturns immediately and the next retry succeeds with DNS working.