Merge "Revert "Allow setting any_errors_fatal true for gather-facts"" into stable/2023.2

This commit is contained in:
Zuul 2024-10-09 07:54:06 +00:00 committed by Gerrit Code Review
commit 648aaa7684
5 changed files with 14 additions and 22 deletions

View File

@ -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 }}"
serial: '{{ kolla_serial|default("0") }}'
gather_facts: false
tasks:
@ -30,7 +29,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 }}"
serial: '{{ kolla_serial|default("0") }}'
gather_facts: false
vars:

View File

@ -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
###################

View File

@ -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
###############
# Kolla options
###############

View File

@ -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``.

View File

@ -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 }}"
# Zed dropped install_type so we have it only on upgrades
network_interface: "{{ api_interface_name }}"