Browse Source

Enabled ssh retries for ansible

Adds the option to retry failed ssh executions if the failure is encountered
in ssh itself, not the remote command. This can be helpful if there are
transient network issues.

Set to 3 attempts, currently unable to override this setting. A future
patch could expose it to end users.

http://docs.ansible.com/ansible/latest/intro_configuration.html#retries

Change-Id: I9a583e49253e3713f69981c4981369e4d35aaedd
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
changes/53/537953/2
Paul Belanger 4 years ago
parent
commit
d97d36c57d
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
  1. 3
      zuul/executor/server.py

3
zuul/executor/server.py

@ -1261,6 +1261,9 @@ class AnsibleJob(object):
config.write('internal_poll_interval = 0.01\n')
config.write('[ssh_connection]\n')
# NOTE(pabelanger): Try up to 3 times to run a task on a host, this
# helps to mitigate UNREACHABLE host errors with SSH.
config.write('retries = 3\n')
# NB: when setting pipelining = True, keep_remote_files
# must be False (the default). Otherwise it apparently
# will override the pipelining option and effectively

Loading…
Cancel
Save