From 7778c19a4d2c36ab47045ce84e4fe5744abd5089 Mon Sep 17 00:00:00 2001 From: Mihai Plasoianu Date: Mon, 27 Apr 2020 12:58:22 +0200 Subject: [PATCH] Fix node scaling The playbook fails when removing unreachable nodes from deployment with `openstack overcloud delete node`. Some `ignore_unreachable: true` are missing. Also, one cannot use `any_errors_fatal: true` when ignoring unreachable nodes, otherwise the playbook execution will stop after the current task. Change-Id: Ibcb84e58bac1975490df281c0de950cdf74337b2 (cherry picked from commit f14007220f96eea040a528daf75a6b4873b3ee19) --- common/deploy-steps-playbooks-common.yaml | 7 ++++--- common/deploy-steps.j2 | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/common/deploy-steps-playbooks-common.yaml b/common/deploy-steps-playbooks-common.yaml index eb5dbf4968..84c51c7c58 100644 --- a/common/deploy-steps-playbooks-common.yaml +++ b/common/deploy-steps-playbooks-common.yaml @@ -1,7 +1,7 @@ - hosts: "{{ deploy_source_host }}" name: Gather facts from undercloud gather_facts: yes - any_errors_fatal: yes + any_errors_fatal: "{{ not ignore_unreachable | default(true) }}" ignore_unreachable: "{{ ignore_unreachable | default(false) }}" become: false tags: @@ -10,7 +10,7 @@ - hosts: "{{ deploy_target_host }}" name: Gather facts from overcloud gather_facts: yes - any_errors_fatal: yes + any_errors_fatal: "{{ not ignore_unreachable | default(true) }}" ignore_unreachable: "{{ ignore_unreachable | default(false) }}" tags: - facts @@ -18,7 +18,8 @@ - hosts: all name: Load global variables gather_facts: "{{ gather_facts | default(false) }}" - any_errors_fatal: yes + any_errors_fatal: "{{ not ignore_unreachable | default(true) }}" + ignore_unreachable: "{{ ignore_unreachable | default(false) }}" tasks: - include_vars: global_vars.yaml no_log: true diff --git a/common/deploy-steps.j2 b/common/deploy-steps.j2 index 155deb82cd..2df79fef5c 100644 --- a/common/deploy-steps.j2 +++ b/common/deploy-steps.j2 @@ -1158,7 +1158,7 @@ outputs: # Without up-to-date facts, we're creating a potential failure # scenario. gather_facts: true - any_errors_fatal: yes + ignore_unreachable: true become: false vars: bootstrap_server_id: BOOTSTRAP_SERVER_ID