Allow to switch from parallel to serial update.
We can encounter corner case pacemaker issues with parallel role update. While we solve them, we need a way to disable parallel role update. Using a idiom mentionned in the ansible documentation[1] we start role update by batch. When batch is 1, this is serial update, one role after another. This is the default. [1] https://docs.ansible.com/ansible/latest/user_guide/playbooks_async.html Change-Id: I03378557653d07113fa70782e5d22bf5e3e969b8 (cherry picked from commit8d2027f1f1
) (cherry picked from commita7704f6559
)
This commit is contained in:
parent
c4fea34797
commit
52c2dda30a
|
@ -22,6 +22,7 @@ overcloud_upgrade: false
|
||||||
undercloud_update: false
|
undercloud_update: false
|
||||||
overcloud_update: false
|
overcloud_update: false
|
||||||
overcloud_images_validate: false
|
overcloud_images_validate: false
|
||||||
|
overcloud_batch_update: false
|
||||||
|
|
||||||
# enable ffu upgrade
|
# enable ffu upgrade
|
||||||
ffu_undercloud_upgrade: false
|
ffu_undercloud_upgrade: false
|
||||||
|
|
|
@ -2,26 +2,20 @@
|
||||||
- name: import tasks from l3_agent_connectivity_check_start_script
|
- name: import tasks from l3_agent_connectivity_check_start_script
|
||||||
import_tasks: ../common/l3_agent_connectivity_check_start_script.yml
|
import_tasks: ../common/l3_agent_connectivity_check_start_script.yml
|
||||||
|
|
||||||
- name: run overcloud minor update in each of the roles/hostgroups
|
- name: Are we running in parallel or serially ?
|
||||||
async: 25200
|
debug:
|
||||||
poll: 0
|
msg: "{{ (overcloud_batch_update|bool) | ternary('Running in parallel', 'Running serially') }}"
|
||||||
shell: |
|
|
||||||
set -o pipefail
|
- name: generate roles list from inventory file
|
||||||
bash {{ overcloud_update_run_script_base }}-{{ item }}.sh 2>&1 {{ timestamper_cmd }} > \
|
import_tasks: ../common/load_roles_from_inventory.yaml
|
||||||
{{ working_dir }}/overcloud_update_run_{{ item }}.log
|
when: not oc_roles
|
||||||
loop: "{{ oc_roles|default(['all']) }}"
|
|
||||||
register: overcloud_update_nodes
|
- name: Run update.
|
||||||
ignore_errors: true
|
vars:
|
||||||
|
oc_current_role: "{{ item }}"
|
||||||
|
include_tasks: overcloud_update_run_role.yml
|
||||||
|
loop: "{{ oc_roles|default(['all'])|batch((overcloud_batch_update|bool) | ternary(100, 1))|list }}"
|
||||||
|
|
||||||
- name: was the overcloud minor update successful?
|
|
||||||
async_status:
|
|
||||||
jid: "{{ async_result_item.ansible_job_id }}"
|
|
||||||
loop: "{{ overcloud_update_nodes.results }}"
|
|
||||||
loop_control:
|
|
||||||
loop_var: "async_result_item"
|
|
||||||
register: async_poll_results
|
|
||||||
until: async_poll_results.finished
|
|
||||||
retries: 25200
|
|
||||||
|
|
||||||
- name: import tasks from l3_agent_connectivity_check_stop_script
|
- name: import tasks from l3_agent_connectivity_check_stop_script
|
||||||
import_tasks: ../common/l3_agent_connectivity_check_stop_script.yml
|
import_tasks: ../common/l3_agent_connectivity_check_stop_script.yml
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
---
|
||||||
|
- name: run overcloud minor update in each of the roles/hostgroups
|
||||||
|
async: 25200
|
||||||
|
poll: 0
|
||||||
|
shell: |
|
||||||
|
set -o pipefail
|
||||||
|
bash {{ overcloud_update_run_script_base }}-{{ oc_running_role }}.sh 2>&1 {{ timestamper_cmd }} > \
|
||||||
|
{{ working_dir }}/overcloud_update_run_{{ oc_running_role }}.log
|
||||||
|
loop: "{{ oc_current_role }}"
|
||||||
|
loop_control:
|
||||||
|
loop_var: "oc_running_role"
|
||||||
|
register: overcloud_update_nodes
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
|
- name: was the overcloud minor update successful?
|
||||||
|
async_status:
|
||||||
|
jid: "{{ async_result_item.ansible_job_id }}"
|
||||||
|
loop: "{{ overcloud_update_nodes.results }}"
|
||||||
|
loop_control:
|
||||||
|
loop_var: "async_result_item"
|
||||||
|
register: async_poll_results
|
||||||
|
until: async_poll_results.finished
|
||||||
|
retries: 25200
|
Loading…
Reference in New Issue