Skip to content
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

Rescue Errno::ETIMEDOUT instead of Timeout::Error on Establish #802

Conversation

Annih
Copy link
Contributor

@Annih Annih commented Aug 3, 2015

Fix #800
net-ssh 2.10 does not use 'timeout' anymore, it use the Socket connect_timeout instead.
See: net-ssh/net-ssh@58b3797 and net-ssh/net-ssh@9bfbdc9

@Annih Annih force-pushed the fix_800_missing_constant_timeout branch from 90224d2 to 8532ada Compare August 3, 2015 08:59
@tyler-ball tyler-ball added this to the 1.4.2 milestone Aug 3, 2015
@tyler-ball
Copy link
Contributor

@Annih will you rebase this off master? Should fix the appveyor issue

@tyler-ball tyler-ball merged commit 8532ada into test-kitchen:master Aug 3, 2015
tyler-ball added a commit that referenced this pull request Aug 3, 2015
…meout

Rescue Errno::ETIMEDOUT instead of Timeout::Error on Establish
@tyler-ball
Copy link
Contributor

Hey @Annih I took care of the merge. I changed the code to catch both errors and retry them so it works with net-ssh 2.9 and 2.10

Also, thanks for this PR and getting the ball rolling on these fixes!

@Annih
Copy link
Contributor Author

Annih commented Aug 4, 2015

Sorry for the delay @tyler-ball and thanks for the quick release!

@komuta
Copy link

komuta commented Oct 26, 2015

@tyler-ball I think the problem is still there, at least when using net-ssh 2.10, because Timeout::Error is still referenced in the code but not in net-ssh anymore :

-----> Starting Kitchen (v1.4.2)
------Exception-------
Class: Kitchen::ClientError
Message: Could not load the 'ssh' transport from the load path. Please ensure that your transport is installed as a gem or included in your Gemfile if using Bundler.
---Nested Exception---
Class: NameError
Message: uninitialized constant Kitchen::Transport::Ssh::Connection::Timeout

Tested with ruby 2.1.2, Kitchen 1.4.2, net-ssh 2.10.0beta2

@tyler-ball
Copy link
Contributor

@komuta Thanks for the report! What does your environment look like? Are you using the ChefDK?

Can you modify lib/kitchen/transport/ssh.rb locally and add a require 'timeout' at the top? I'm guessing that will fix the NameError you are seeing. If it does, would you mind submitting a PR and pinging me?

@komuta
Copy link

komuta commented Oct 27, 2015

I was just beginning to try Test Kitchen with Vagrant, Ansible and Serverspec. I don't use Chef at all.

I did the modification and now it works perfectly well. I'll submit a new pull request.

@komuta
Copy link

komuta commented Oct 27, 2015

@tyler-ball Here is the PR : #866

@test-kitchen test-kitchen locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants