Merge "Run online data migration before update/upgrade converge."

This commit is contained in:
Zuul 2018-11-23 18:15:55 +00:00 committed by Gerrit Code Review
commit 9a3f8d8e8a
5 changed files with 46 additions and 0 deletions

View File

@ -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 }}"

View File

@ -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

View File

@ -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 }}"

View 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

View 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