Adds ServerAliveInterval to ssh_args to prevent frozen connections
This change is adding a -o ServerAliveInterval=60 to the default settings used by zuul builder in order to avoid random freeze of Ansible. References: * https://stackoverflow.com/a/31442114/99834 * https://github.com/openstack/tripleo-quickstart/search?q=ServerAliveInterval&unscoped_q=ServerAliveInterval * https://github.com/redhat-openstack/infrared/search?q=ServerAliveInterval&unscoped_q=ServerAliveInterval * https://docs.ansible.com/ansible/latest/reference_appendices/config.html?highlight=ssh_args#ansible-ssh-args Change-Id: I92509d3e3ea7bbfc7beb1352b35f5c9a9e7a6339 Related-Bug: https://bugs.launchpad.net/openstack-gate/+bug/1807940
This commit is contained in:
parent
5f5032cf82
commit
f9b24e6ea8
|
@ -1663,6 +1663,7 @@ class AnsibleJob(object):
|
|||
config.write('pipelining = True\n')
|
||||
config.write('control_path_dir = %s\n' % self.jobdir.control_path)
|
||||
ssh_args = "-o ControlMaster=auto -o ControlPersist=60s " \
|
||||
"-o ServerAliveInterval=60 " \
|
||||
"-o UserKnownHostsFile=%s" % self.jobdir.known_hosts
|
||||
config.write('ssh_args = %s\n' % ssh_args)
|
||||
|
||||
|
|
Loading…
Reference in New Issue