-
Notifications
You must be signed in to change notification settings - Fork 722
[ssh/ssh_session] different timeouts for connect & established #3971
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3971 +/- ##
=======================================
Coverage 89.13% 89.13%
=======================================
Files 257 257
Lines 14626 14630 +4
=======================================
+ Hits 13037 13041 +4
Misses 1589 1589 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! sshfs mounts didn't give me any issues and other ssh features worked as expected.
7af7943
to
2d1f6cd
Compare
Reduced the connect timeout from 10 to 5 as discussed. @ricab @andrei-toterman @georgeliao |
Sometimes ssh_connect blocks while a VM is booting up where it won't return to the caller at all. Since the timeout is set to ~infinity the ssh_connect would block forever. This patch fixes that by using two different timeout values for the different session connection states. Signed-off-by: Mustafa Kemal Gilor <mustafa.gilor@canonical.com>
as discussed. Signed-off-by: Mustafa Kemal Gilor <mustafa.gilor@canonical.com>
2d1f6cd
to
f7364a8
Compare
Interestingly, this indirectly fixes #3965 |
Good to hear! Two birds with one stone 😉 |
The change is sane to me. Basically, we set the |
That's the question. I think some quirks are going on regarding how libssh handles the situation. Maybe the server is disconnecting the connection (because it's too early for a client to connect), but libssh somehow not picking it up. The timeout is designed to handle situations like this, but I still believe there's a bug in ssh_connect that leads to it. |
Thanks for the reviews @georgeliao, @Sploder12! |
Sometimes, ssh_connect blocks while a VM is booting up, where it won't return to the caller at all. Since the timeout is set to ~infinity the ssh_connect would block forever.
This patch fixes that by using two different timeout values for the different session connection states.
MULTI-1863