Browse Source

Relax facts gathering plays on the overcloud

Tolerate failures on all the plays that run on the overcloud and which
potentially run with facts gathering only (no other tasks).

Since they can't apply a strategy, we want to let them fail without
error. In a later play, we have our tripleo strategies which will figure
out if we have reached the maximum of failures that was configured with
MaxFailPercentage.

Change-Id: I43652972494a9ed1f2b8b483fe19e685cbe4da1b
(cherry picked from commit 107b9c4c90)
changes/43/741943/2
Emilien Macchi 1 month ago
parent
commit
a1443bb827
2 changed files with 16 additions and 6 deletions
  1. +16
    -5
      common/deploy-steps-playbooks-common.yaml
  2. +0
    -1
      common/deploy-steps.j2

+ 16
- 5
common/deploy-steps-playbooks-common.yaml View File

@@ -1,3 +1,10 @@
---
# If a new play with potential facts gathering is added, make sure we set:
# any_errors_fatal: false
# ignore_unreachable: true
# So we don't break the MaxFailPercentage feature since these plays can't use
# Ansible strategies.

- hosts: all
name: Clear cached facts
tasks:
@@ -7,7 +14,7 @@
name: Gather facts from undercloud
gather_facts: yes
any_errors_fatal: true
ignore_unreachable: "{{ scale_ignore_unreachable | default(false) }}"
ignore_unreachable: false
become: false
tags:
- facts
@@ -17,7 +24,11 @@
gather_facts: yes
# False because https://github.com/ansible/ansible/issues/70663
any_errors_fatal: false
ignore_unreachable: "{{ scale_ignore_unreachable | default(false) }}"
# If an overcloud node is down, we will let MaxFailPercentage
# figuring out if the deployment can continue. For the facts gathering tasks,
# we will simply ignore unreachable nodes and errors, and let the
# Ansible reports the failure in the next plays.
ignore_unreachable: true
tags:
- facts

@@ -25,7 +36,7 @@
name: Load global variables
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: false
ignore_unreachable: "{{ scale_ignore_unreachable | default(false) }}"
ignore_unreachable: true
tasks:
- include_vars: global_vars.yaml
no_log: true
@@ -38,7 +49,7 @@
become: true
gather_facts: false
any_errors_fatal: false
ignore_unreachable: "{{ scale_ignore_unreachable | default(false) }}"
ignore_unreachable: true
tasks:
- name: Ensure /var/lib/config-data context
shell: |-
@@ -77,7 +88,7 @@
name: Set all_nodes data as group_vars for overcloud
gather_facts: "{{ gather_facts | default(false) }}"
any_errors_fatal: false
ignore_unreachable: "{{ scale_ignore_unreachable | default(false) }}"
ignore_unreachable: true
tasks:
- name: Set all_nodes data as group_vars for overcloud
include_vars: "{{ playbook_dir }}/group_vars/overcloud.json"


+ 0
- 1
common/deploy-steps.j2 View File

@@ -1144,7 +1144,6 @@ outputs:
vars:
deploy_source_host: "DEPLOY_SOURCE_HOST"
deploy_target_host: "DEPLOY_TARGET_HOST"
scale_ignore_unreachable: true

- hosts: DEPLOY_TARGET_HOST
name: Scaling


Loading…
Cancel
Save