Run online data migration before update/upgrade converge.
Some services have an online component to their upgrade
procedure – operations which don’t induce downtime and
can run while the cloud operates normally.
Change-Id: I9b0bef15303bb14ef734b265f28607aa4d491910
(cherry picked from commit 43cc0dbec2
)
This commit is contained in:
parent
c02dcb765b
commit
ae0fc106a8
@ -54,6 +54,13 @@
|
||||
with_items:
|
||||
- "{{ oc_roles|default('all') }}"
|
||||
|
||||
- name: create online data migration script
|
||||
template:
|
||||
src: "overcloud_online_data_migration.sh.j2"
|
||||
dest: "{{ working_dir }}/overcloud_online_data_migration.sh"
|
||||
mode: 0755
|
||||
force: true
|
||||
|
||||
- name: create overcloud update converge script
|
||||
template:
|
||||
src: "{{ overcloud_update_converge_template }}"
|
||||
|
@ -99,6 +99,13 @@
|
||||
include: ceph_update_run.yml
|
||||
when: ceph_osd_enabled|bool
|
||||
|
||||
- name: run online data migration
|
||||
args:
|
||||
chdir: "{{working_dir}}"
|
||||
shell: |
|
||||
set -o pipefail
|
||||
bash {{ working_dir }}/overcloud_online_data_migration.sh 2>&1 {{ timestamper_cmd }} > overcloud_update_data_migration.log
|
||||
|
||||
- name: apply pre overcloud update converge workarounds
|
||||
command: "{{working_dir}}/pre_overcloud_update_converge_workarounds.sh"
|
||||
when: updates_workarounds
|
||||
|
@ -70,6 +70,13 @@
|
||||
with_items:
|
||||
- "{{ oc_roles|default('all') }}"
|
||||
|
||||
- name: create online data migration script
|
||||
template:
|
||||
src: "overcloud_online_data_migration.sh.j2"
|
||||
dest: "{{ working_dir }}/overcloud_online_data_migration.sh"
|
||||
mode: 0755
|
||||
force: true
|
||||
|
||||
- name: create overcloud converge script
|
||||
vars:
|
||||
old_img: "{{ working_dir }}/{{ container_registry_file }}"
|
||||
|
@ -136,6 +136,13 @@
|
||||
chdir: "{{working_dir}}"
|
||||
when: upgrade_workarounds
|
||||
|
||||
- name: run online data migration
|
||||
args:
|
||||
chdir: "{{working_dir}}"
|
||||
shell: |
|
||||
set -o pipefail
|
||||
bash {{ working_dir }}/overcloud_online_data_migration.sh 2>&1 {{ timestamper_cmd }} > overcloud_upgrade_data_migration.log
|
||||
|
||||
- include: overcloud_upgrade_converge.yml
|
||||
tags: overcloud_upgrade_converge
|
||||
|
||||
|
18
templates/overcloud_online_data_migration.sh.j2
Normal file
18
templates/overcloud_online_data_migration.sh.j2
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/env bash
|
||||
#
|
||||
# Run online data migration for OpenStack services
|
||||
#
|
||||
{% if overcloud_update|bool -%}
|
||||
{% set operation_type = 'update' -%}
|
||||
{% elif overcloud_upgrade|bool -%}
|
||||
{% set operation_type = 'upgrade' -%}
|
||||
{% endif -%}
|
||||
set -euo pipefail
|
||||
|
||||
source {{ undercloud_rc }}
|
||||
|
||||
echo "[$(date)] Run online data migration for overcloud during {{ operation_type }}"
|
||||
|
||||
openstack overcloud external-{{ operation_type }} run \
|
||||
--stack {{ overcloud_stack_name }} \
|
||||
--tags online_upgrade 2>&1
|
Loading…
Reference in New Issue
Block a user