diff --git a/ansible/gather-facts.yml b/ansible/gather-facts.yml index cf5f3b042f..a30c7f4ed2 100644 --- a/ansible/gather-facts.yml +++ b/ansible/gather-facts.yml @@ -4,7 +4,6 @@ # building their configurations. - name: Gather facts for all hosts hosts: all - any_errors_fatal: "{{ kolla_ansible_setup_any_errors_fatal | bool }}" max_fail_percentage: >- {{ gather_facts_max_fail_percentage | default(kolla_max_fail_percentage) | @@ -34,7 +33,6 @@ # the limit. - name: Gather facts for all hosts (if using --limit) hosts: all_using_limit_True - any_errors_fatal: "{{ kolla_ansible_setup_any_errors_fatal | bool }}" max_fail_percentage: >- {{ gather_facts_max_fail_percentage | default(kolla_max_fail_percentage) | diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 1b4a311c7c..8eef043c17 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -36,14 +36,6 @@ kolla_ansible_setup_filter: "{{ omit }}" # By default, we do not provide a gather subset. kolla_ansible_setup_gather_subset: "{{ omit }}" -# This variable is used as "any_errors_fatal" setting for the setup (gather -# facts) plays. -# This is useful for weeding out failing hosts early to avoid late failures -# due to missing facts (especially cross-host). -# Do note this still supports host fact caching and it will not affect -# scenarios with all facts cached (as there is no task to fail). -kolla_ansible_setup_any_errors_fatal: false - ################### # Kolla options ################### diff --git a/etc/kolla/globals.yml b/etc/kolla/globals.yml index 09eb0465a5..5788fac680 100644 --- a/etc/kolla/globals.yml +++ b/etc/kolla/globals.yml @@ -24,14 +24,6 @@ # Dummy variable to allow Ansible to accept this file. workaround_ansible_issue_8743: yes -# This variable is used as "any_errors_fatal" setting for the setup (gather -# facts) plays. -# This is useful for weeding out failing hosts early to avoid late failures -# due to missing facts (especially cross-host). -# Do note this still supports host fact caching and it will not affect -# scenarios with all facts cached (as there is no task to fail). -#kolla_ansible_setup_any_errors_fatal: false - # This variable may be used to set the maximum failure percentage for all # plays. More fine-grained control is possible via per-service variables, e.g. # nova_max_fail_percentage. The default behaviour is to set a max fail diff --git a/releasenotes/notes/remove-any-errors-fatal-664fc2207074f0ef.yaml b/releasenotes/notes/remove-any-errors-fatal-664fc2207074f0ef.yaml new file mode 100644 index 0000000000..7060d884ba --- /dev/null +++ b/releasenotes/notes/remove-any-errors-fatal-664fc2207074f0ef.yaml @@ -0,0 +1,14 @@ +--- +upgrade: + - | + Support for failing execution early if fact collection fails on any of the + hosts by setting ``kolla_ansible_setup_any_errors_fatal`` to ``true`` has + been removed. This is due to Ansible's ``any_errors_fatal`` parameter not + being templated, resulting in the value always being interpreted as + ``true``, even though the default value of + ``kolla_ansible_setup_any_errors_fatal`` is ``false``. + + Equivalent behaviour is possible by setting the maximum failure percentage + to 0. This may be done specifically for fact gathering using + ``gather_facts_max_fail_percentage`` or globally using + ``kolla_max_fail_percentage``. diff --git a/tests/templates/globals-default.j2 b/tests/templates/globals-default.j2 index 32617b88b1..c34f1ed9f1 100644 --- a/tests/templates/globals-default.j2 +++ b/tests/templates/globals-default.j2 @@ -5,10 +5,6 @@ ansible_python_interpreter: /usr/bin/python3 {% endif %} -# NOTE(yoctozepto): In CI it makes sense to always try to fail -# as early as possible. -kolla_ansible_setup_any_errors_fatal: true - kolla_base_distro: "{{ base_distro }}" network_interface: "{{ api_interface_name }}" network_address_family: "{{ address_family }}"