[BUG] Setting ssh_timeout seems to have no effect
Description
Settingssh_timeout: 120 in salt-master config does not change the ConnectTimeout value for ssh commands.
Expected behavior ConnectTimeout is changed to the value of ssh_timeout.
Versions Report
Salt Version:
Salt: 3004.1
Dependency Versions:
cffi: Not Installed
cherrypy: unknown
dateutil: 2.8.1
docker-py: Not Installed
gitdb: 4.0.9
gitpython: 3.1.24
Jinja2: 3.0.3
libgit2: Not Installed
M2Crypto: 0.38.0
Mako: Not Installed
msgpack: 1.0.3
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: Not Installed
pycryptodome: 3.11.0
pygit2: Not Installed
Python: 3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0]
python-gnupg: 0.4.8
PyYAML: 5.4.1
PyZMQ: 22.3.0
smmap: 5.0.0
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.4
System Versions:
dist: ubuntu 22.04 Jammy Jellyfish
locale: utf-8
machine: x86_64
release: 5.15.0-1013-aws
system: Linux
version: Ubuntu 22.04 Jammy Jellyfish
Additional context
2022-08-09 14:01:00,613 [salt.utils.reactor:85 ][DEBUG ][2583674] Gathering reactors for tag salt/cloud/i-ffffffffffffffff/deploying
...
2022-08-09 14:01:00,637 [salt.loaded.int.utils.cloud:1488][DEBUG ][2583674] Deploying 10.xx.xx.xx at 2022-08-09 14:01:00
2022-08-09 14:01:00,637 [salt.loaded.int.utils.cloud:740 ][DEBUG ][2583674] Attempting connection to host 10.xx.xx.xx on port 22
2022-08-09 14:01:00,729 [salt.loaded.int.utils.cloud:1493][DEBUG ][2583674] SSH port 22 on 10.xx.xx.xx is available
...
2022-08-09 14:01:00,730 [salt.loaded.int.utils.cloud:1175][DEBUG ][2583674] Attempting to authenticate as ubuntu (try 1 of 15)
2022-08-09 14:01:00,731 [salt.loaded.int.utils.cloud:2480][DEBUG ][2583674] SSH command: 'ssh -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -oControlPath=none -oPasswordAuthentication=no -oChallengeResponseAuthentication=no -oPubkeyAuthentication=yes -oIdentitiesOnly=yes -oKbdInteractiveAuthentication=no -i /etc/salt/keys/private_key.pem -oConnectTimeout=15 -p 22 [email protected] date'
The ssh_ settings in the master config only apply to salt-ssh, not to any other SSH connection.
So maybe this is more like a feature request? (configure ConnectionTimeout and/or number of retries before giving up)
Salt Cloud has a separate ssh_timeout setting, as far as I can see: #60632
I'm not sure where it would be documented, if it is.
Setting ssh_timeout in /etc/salt/cloud and restarting salt-master didn't change the connection timeout. It is still 15 seconds.
Assigning to @cmcmarrow as the author of the feature.
Yea, this sounds like a Feature. We should just reuse ssh_timeout and pass it to the connection time.
We need to handle timeout and ssh-timeout we are crossing them and excluding one or the other depending on what function you are using, all with in the same module.