From 61460d889a7e398d0ce9aa2857cb851e6f0dc84d Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Tue, 27 Aug 2024 16:20:29 +0100 Subject: [PATCH] Workaround: Disable SSH pipelining There is a race condition in Ansible that can result in this failure: msg: |- MODULE FAILURE See stdout/stderr for the exact error rc: -13 See https://github.com/ansible/ansible/issues/78344 and https://github.com/ansible/ansible/issues/81777. In https://github.com/stackhpc/stackhpc-kayobe-config/pull/1108 we applied a workaround to increase the ControlPersist timeout to 1 hour, but this does not always work. Disabling SSH pipelining prevents the issue at the cost of Ansible execution duration. --- ansible/deploy-openstack-config.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ansible/deploy-openstack-config.yml b/ansible/deploy-openstack-config.yml index c7b0ae3..8a83b8d 100644 --- a/ansible/deploy-openstack-config.yml +++ b/ansible/deploy-openstack-config.yml @@ -118,6 +118,25 @@ vars: kayobe_environment_path: "{{ src_directory }}/kayobe-config/etc/kayobe/environments/{{ kayobe_config_environment }}" + # WORKAROUND: + # There is a race condition in Ansible that can result in this failure: + # msg: |- + # MODULE FAILURE + # See stdout/stderr for the exact error + # rc: -13 + # See https://github.com/ansible/ansible/issues/78344 and + # https://github.com/ansible/ansible/issues/81777. + # In https://github.com/stackhpc/stackhpc-kayobe-config/pull/1108 we applied + # a workaround to increase the ControlPersist timeout to 1 hour, but this + # does not always work. + # Disabling SSH pipelining prevents the issue at the cost of Ansible + # execution duration. + - name: Disable SSH pipelining + ansible.builtin.replace: + path: "{{ src_directory }}/{{ kayobe_config_name }}/etc/kayobe/ansible.cfg" + regexp: "^pipelining.*=.*" + replace: "pipelining = False" + - name: Ensure hooks directory are present ansible.builtin.file: dest: "{{ src_directory }}/{{ kayobe_config_name }}/etc/kayobe/hooks/{{ item }}"