Skip to content

Timeout for retrying initial ssh connection #118

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

joshdk
Copy link
Contributor

@joshdk joshdk commented Mar 6, 2018

No description provided.

@joshdk joshdk force-pushed the feature/retry-timeout branch from c696a6a to fdf8c17 Compare March 6, 2018 05:50
@codecov-io
Copy link

codecov-io commented Mar 6, 2018

Codecov Report

Merging #118 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #118   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           1      1           
  Lines         107    129   +22     
=====================================
+ Hits          107    129   +22
Impacted Files Coverage Δ
plugin.go 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6c0b475...b40bfc5. Read the comment docs.

@joshdk joshdk force-pushed the feature/retry-timeout branch from fdf8c17 to b40bfc5 Compare March 6, 2018 05:58
@joshdk
Copy link
Contributor Author

joshdk commented Mar 6, 2018

The motivation behind this feature is that in our Drone build we dynamically provision a VM, then run commands on it for testing (see my comments here).

This VM is quickly "up" from a cloud infrastructure perspective, but it is often the case where SSHD needs an additional ~30 seconds to be functional. This PR adds an additional PLUGIN_RETRY_TIMEOUT value that allows a developer to specify how long to attempt to connect to the host for, retrying whenever a network error is encountered, with exponential backoff.

Basically prevents your entire build from turning red, just because your SSH daemon took a few seconds too long to start 😄

Cheers!

@joshdk
Copy link
Contributor Author

joshdk commented Mar 9, 2018

@appleboy do you have any thoughts on this PR? I would be happy to hear any feedback you have 😄

@appleboy
Copy link
Owner

I will take this.

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 this pull request may close these issues.

3 participants