Skip to content

SSH connect timeout is too long (60s) #4715

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
tclh123 opened this issue Jun 20, 2019 · 4 comments
Open

SSH connect timeout is too long (60s) #4715

tclh123 opened this issue Jun 20, 2019 · 4 comments

Comments

@tclh123
Copy link

tclh123 commented Jun 20, 2019

The st2 ssh connect timeout in st2 ssh_runner is 60s and it is not configurable.
It is too long - the ansibile default is 10s.

We better make it configurable and give it a more suitable default value.

@arm4b
Copy link
Member

arm4b commented Jun 20, 2019

Thanks for the report.

To make sure we're talking about the same timeout, how did you identify it's 60s?

@tclh123
Copy link
Author

tclh123 commented Jun 21, 2019

Hi @armab
It's hardcoded here https://github.com/StackStorm/st2/blob/master/st2common/st2common/runners/paramiko_ssh.py#L84.

I make my own runner to bypass this problem.
By the way, I have another doubt - the parallel option is set to False and immutable, so how can users use this runner in parallel? It's weird.

@arm4b
Copy link
Member

arm4b commented Jun 21, 2019

Thanks for more info @tclh123, indeed configurable connect timeout is something that could be improved.
I think it makes sense to expose it via st2.conf settings and

st2/conf/st2.conf.sample

Lines 293 to 303 in 0b83322

[ssh_runner]
# Max number of parallel remote SSH actions that should be run. Works only with Paramiko SSH runner.
max_parallel_actions = 50
# Location of the script on the remote filesystem.
remote_dir = /tmp
# Use the .ssh/config file. Useful to override ports etc.
use_ssh_config = False
# Path to the ssh config file.
ssh_config_file_path = ~/.ssh/config
# How partial success of actions run on multiple nodes should be treated.
allow_partial_failure = False
looks like an ideal place.

We accept PRs/contributions so you're motivated to enhance that, - we're open to it.

@winem
Copy link
Contributor

winem commented Apr 12, 2020

Just a short notice on this topic to avoid redundant work:

I am working on a fix. Would call it code-complete and it just needs a bit more of testing. PR will follow very soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants