From a45afbeac549c8324c96cb287310878b59eff673 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Fri, 1 Dec 2023 10:27:04 -0800 Subject: [PATCH] Increase bridge's ansible ssh controlpersist timeout to 180s There is an Ansible bug where if successive tasks are separated in time by the ssh controlpersist timeout Ansible will race ssh's updates to the connection causing the second task to fail with an rc of -13 [0]. Statistically we believe that the longer times between tasks are less likely. This means ssh controlpersist timeout values that are larger will be less likely to have ansible hit this bug. Increase the value from a default of 60s to 180s to take advantage of this probability. [0] https://github.com/ansible/ansible/issues/81777 Change-Id: Ic40730c3e0bd814e6a5c739e4415657594362032 --- playbooks/roles/install-ansible/templates/ansible.cfg.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/playbooks/roles/install-ansible/templates/ansible.cfg.j2 b/playbooks/roles/install-ansible/templates/ansible.cfg.j2 index 25f6495128..47f61d62dc 100644 --- a/playbooks/roles/install-ansible/templates/ansible.cfg.j2 +++ b/playbooks/roles/install-ansible/templates/ansible.cfg.j2 @@ -29,6 +29,10 @@ any_unparsed_is_failed=True [ssh_connection] retries=3 pipelining = True +# Override the default ControlPersist value of 60s due to +# https://github.com/ansible/ansible/issues/81777 and the hunch that +# fewer task pairs have larger deltas between them. +ssh_args = -o ControlMaster=auto -o ControlPersist=180s [callback_profile_tasks] task_output_limit = 50