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

Retries in ConnectionCheckSSH #751

Closed
php50350 opened this issue Oct 1, 2019 · 6 comments
Closed

Retries in ConnectionCheckSSH #751

php50350 opened this issue Oct 1, 2019 · 6 comments
Assignees
Labels
bug An issue reporting a bug or a PR fixing one.

Comments

@php50350
Copy link

php50350 commented Oct 1, 2019

In the execute method of ConnectionCheckSSH, there is a line of code as follow:

final int retries = Math.min(0, parent.retries);

That causes the number of retries to be always 0 (unless the parent.retries is negative). The result is that when the plugin starts a Docker container and then attempts to connect to it, the error "java.io.IOException: SSH service hadn't started after 0 seconds." will often be encountered.

@pjdarton
Copy link
Member

pjdarton commented Oct 1, 2019

"oops"
Yes, that looks like a bit of an oversight on my part.
...and that code had no a faulty unit-test so this one slipped through.

I'll fix it.

@pjdarton
Copy link
Member

pjdarton commented Oct 1, 2019

OK, I've created PR #752 that should fix this.

It's been built by ci.jenkins.io and you can get a .hpi file from the "Last Successful Artifacts" listed under https://ci.jenkins.io/job/Plugins/job/docker-plugin/job/PR-752/
Please download it, install it on your Jenkins server(s) [manage jenkins -> manage plugins -> advanced], test that it fixes the bug for you and let me know the results (here).
If it's all confirmed ok then I'll release the fix officially.

@pjdarton
Copy link
Member

pjdarton commented Oct 1, 2019

...also, if you could check the code changes (in #752) then that would be helpful - it would be rather embarrassing if the fix for this was also buggy... 😉

@pjdarton pjdarton self-assigned this Oct 1, 2019
@pjdarton pjdarton added the bug An issue reporting a bug or a PR fixing one. label Oct 1, 2019
@php50350
Copy link
Author

php50350 commented Oct 1, 2019

Thank you for taking a quick response to fix the issue. I did a quick test using the updated plugin in my system and it works fine :)

@pjdarton
Copy link
Member

pjdarton commented Oct 1, 2019

OK, thanks for confirming the fix.
I've merged the code changes into master and this will be fixed in the next release.

@pjdarton
Copy link
Member

Code changes went into released of docker-plugin version 1.1.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue reporting a bug or a PR fixing one.
Projects
None yet
Development

No branches or pull requests

2 participants