266 lines
8.0 KiB
YAML
266 lines
8.0 KiB
YAML
---
|
|
- name: create undercloud update scripts
|
|
include_tasks: create-undercloud-update-scripts.yaml
|
|
args:
|
|
apply:
|
|
tags:
|
|
- create_undercloud_update_scripts
|
|
tags: create_undercloud_update_scripts
|
|
when: update_noop|bool or undercloud_update|bool
|
|
|
|
- block:
|
|
- name: apply pre undercloud update workarounds
|
|
shell: |
|
|
set -o pipefail
|
|
./pre_undercloud_update_workarounds.sh 2>&1 {{ timestamper_cmd }} >> \
|
|
pre_undercloud_update_workarounds.log
|
|
args:
|
|
chdir: "{{ working_dir }}"
|
|
executable: /usr/bin/bash
|
|
when: updates_workarounds|bool
|
|
tags:
|
|
- undercloud_update
|
|
|
|
- name: install/update required packages before updating the undercloud
|
|
become: true
|
|
become_user: root
|
|
import_tasks: ../common/undercloud_prerequisites.yaml
|
|
|
|
- name: run pre-update validation
|
|
import_tasks: ../common/validation_group_run.yaml
|
|
vars:
|
|
validation_group: "pre-update"
|
|
validation_allowed_groups: "{{ updates_validations_groups }}"
|
|
when: run_validations|bool
|
|
tags:
|
|
- undercloud_update
|
|
- updates_validations
|
|
- pre_update_validations
|
|
|
|
- name: collect log before undercloud update
|
|
include_tasks: ../common/trigger_log.yml
|
|
vars:
|
|
log_current_stage: 'before_undercloud_update'
|
|
when:
|
|
- log_stages|bool
|
|
|
|
- name: update undercloud
|
|
shell: |
|
|
set -o pipefail
|
|
{{ undercloud_update_script }} 2>&1 {{ timestamper_cmd }} >> \
|
|
undercloud_update.log
|
|
args:
|
|
chdir: "{{ working_dir }}"
|
|
executable: /usr/bin/bash
|
|
tags: undercloud_update
|
|
|
|
- name: apply post undercloud update workarounds
|
|
shell: |
|
|
set -o pipefail
|
|
./post_undercloud_update_workarounds.sh 2>&1 {{ timestamper_cmd }} >> \
|
|
post_undercloud_update_workarounds.log
|
|
args:
|
|
chdir: "{{ working_dir }}"
|
|
executable: /usr/bin/bash
|
|
when: updates_workarounds|bool
|
|
tags:
|
|
- undercloud_update
|
|
|
|
- name: validate undercloud update
|
|
import_tasks: ../common/undercloud_validate_upgrade.yaml
|
|
tags: undercloud_update_validate
|
|
|
|
when: undercloud_update|bool
|
|
|
|
- name: create overcloud update scripts
|
|
include_tasks: create-overcloud-update-scripts.yaml
|
|
args:
|
|
apply:
|
|
tags:
|
|
- create_overcloud_update_scripts
|
|
tags: create_overcloud_update_scripts
|
|
when: update_noop|bool or overcloud_update|bool
|
|
|
|
- block:
|
|
- name: apply pre overcloud update prepare workarounds
|
|
shell: |
|
|
set -o pipefail
|
|
./pre_overcloud_update_prepare_workarounds.sh 2>&1 {{ timestamper_cmd }} >> \
|
|
pre_overcloud_update_prepare_workarounds.log
|
|
args:
|
|
chdir: "{{ working_dir }}"
|
|
executable: /usr/bin/bash
|
|
when: updates_workarounds|bool
|
|
tags:
|
|
- overcloud_update_prepare
|
|
|
|
- name: run pre-update-prepare validation
|
|
import_tasks: ../common/validation_group_run.yaml
|
|
vars:
|
|
validation_group: "pre-update-prepare"
|
|
validation_allowed_groups: "{{ updates_validations_groups }}"
|
|
when: run_validations|bool
|
|
tags:
|
|
- overcloud_update_prepare
|
|
- updates_validations
|
|
- pre_update_prepare_validations
|
|
|
|
- set_fact:
|
|
controller_host: "{{ inventory_hostmap[controller_role_name]|first }}"
|
|
|
|
- name: run pre-update fencing check
|
|
import_tasks: disable_fencing.yaml
|
|
|
|
- name: import oc update prepare tasks
|
|
import_tasks: overcloud_update_prepare.yml
|
|
tags:
|
|
- overcloud_update_prepare
|
|
|
|
- name: apply post overcloud update prepare workarounds
|
|
shell: |
|
|
set -o pipefail
|
|
./post_overcloud_update_prepare_workarounds.sh 2>&1 {{ timestamper_cmd }} >> \
|
|
post_overcloud_update_prepare_workarounds.log
|
|
args:
|
|
chdir: "{{ working_dir }}"
|
|
executable: /usr/bin/bash
|
|
when: updates_workarounds|bool
|
|
tags:
|
|
- overcloud_update_prepare
|
|
|
|
- name: prepare containers for overcloud update
|
|
args:
|
|
chdir: "{{ working_dir }}"
|
|
executable: /usr/bin/bash
|
|
shell: |
|
|
set -o pipefail
|
|
./overcloud_prepare_containers.sh 2>&1 {{ timestamper_cmd }} >> \
|
|
overcloud_update_prepare_containers.log
|
|
tags:
|
|
- overcloud_update_prepare_containers
|
|
|
|
- name: collect log before OVN controller update
|
|
include_tasks: ../common/trigger_log.yml
|
|
vars:
|
|
log_current_stage: 'before_ovn_controller_update'
|
|
when:
|
|
- log_stages|bool
|
|
|
|
- name: Update OVN controllers.
|
|
shell: |
|
|
set -o pipefail
|
|
./ovn-external-update.sh 2>&1 {{ timestamper_cmd }} >> \
|
|
ovn-external-update.log
|
|
args:
|
|
chdir: "{{ working_dir }}"
|
|
executable: /usr/bin/bash
|
|
tags:
|
|
- overcloud_update_run
|
|
|
|
- name: Ensure ansible-pacemaker module is present in CI.
|
|
package:
|
|
name: ansible-pacemaker
|
|
state: latest
|
|
when: tripleo_ci|default(false)|bool
|
|
become: true
|
|
tags:
|
|
- overcloud_update_run
|
|
|
|
- name: apply pre overcloud update run workarounds
|
|
shell: |
|
|
set -o pipefail
|
|
./pre_overcloud_update_run_workarounds.sh 2>&1 {{ timestamper_cmd }} >> \
|
|
pre_overcloud_update_run_workarounds.log
|
|
args:
|
|
chdir: "{{ working_dir }}"
|
|
executable: /usr/bin/bash
|
|
when: updates_workarounds|bool
|
|
tags:
|
|
- overcloud_update_run
|
|
|
|
- name: run pre-update-run validation
|
|
import_tasks: ../common/validation_group_run.yaml
|
|
vars:
|
|
validation_group: "pre-update-run"
|
|
validation_allowed_groups: "{{ updates_validations_groups }}"
|
|
when: run_validations|bool
|
|
tags:
|
|
- overcloud_update_run
|
|
- updates_validations
|
|
- pre_update_run_validations
|
|
|
|
- name: import overcloud update run tasks
|
|
import_tasks: overcloud_update_run.yml
|
|
tags:
|
|
- overcloud_update_run
|
|
|
|
- name: apply post overcloud update run workarounds
|
|
shell: |
|
|
set -o pipefail
|
|
./post_overcloud_update_run_workarounds.sh 2>&1 {{ timestamper_cmd }} >> \
|
|
post_overcloud_update_run_workarounds.log
|
|
args:
|
|
chdir: "{{ working_dir }}"
|
|
executable: /usr/bin/bash
|
|
when: updates_workarounds|bool
|
|
tags:
|
|
- overcloud_update_run
|
|
|
|
- name: collect log before ceph update
|
|
include_tasks: ../common/trigger_log.yml
|
|
vars:
|
|
log_current_stage: 'before_ceph_update'
|
|
when:
|
|
- log_stages|bool
|
|
|
|
- name: update Ceph
|
|
import_tasks: ceph_update_run.yml
|
|
when: ceph_osd_enabled|bool
|
|
tags:
|
|
- ceph_update_run
|
|
|
|
- name: run online data migration
|
|
args:
|
|
chdir: "{{ working_dir }}"
|
|
executable: /usr/bin/bash
|
|
shell: |
|
|
set -o pipefail
|
|
./overcloud_online_data_migration.sh 2>&1 {{ timestamper_cmd }} >> \
|
|
overcloud_update_data_migration.log
|
|
|
|
- name: run post-update fencing check
|
|
import_tasks: enable_fencing.yaml
|
|
|
|
- name: collect log after update, but before reboot.
|
|
include_tasks: ../common/trigger_log.yml
|
|
vars:
|
|
log_current_stage: 'before_reboot'
|
|
when:
|
|
- log_stages|bool
|
|
|
|
- name: run post-update validation
|
|
import_tasks: ../common/validation_group_run.yaml
|
|
vars:
|
|
validation_group: "post-update"
|
|
validation_allowed_groups: "{{ updates_validations_groups }}"
|
|
when: run_validations|bool
|
|
tags:
|
|
- updates_validations
|
|
- post_update_validations
|
|
|
|
- name: validate overcloud docker images/containers
|
|
shell: |
|
|
set -o pipefail
|
|
{{ overcloud_validate_images_script }} 2>&1 {{ timestamper_cmd }} >> \
|
|
validate_oc_images_containers.log
|
|
args:
|
|
chdir: "{{ working_dir }}"
|
|
executable: /usr/bin/bash
|
|
when: overcloud_images_validate|bool
|
|
tags:
|
|
- overcloud_images_validate
|
|
|
|
- name: import nova_actions_check tasks
|
|
import_tasks: ../common/nova_actions_check.yml
|
|
when: overcloud_update|bool
|