Run online migration tasks from external_update_tasks too.

The minor update procedure has been suggesting the execution of the
online db migrations step for few releases already, by the execution
of the openstack overcloud external-update run --tags online_upgrade.
However, this command has never executed any task at all as the
online_upgrade tasks belong to the external_upgrade_tasks section.
Instead of changing the interface in all releases by modifying the docs
let's just fix this in the code.

Change-Id: I4453e7c755cccc52bb135a14be1b04fdea53de6b
Closes-Bug: #1900467
(cherry picked from commit d18209799c)
This commit is contained in:
Jose Luis Franco Arza 2020-10-19 19:27:21 +02:00 committed by Jose Luis Franco
parent fdc85709bb
commit 1ee73dcb8f
3 changed files with 12 additions and 3 deletions

View File

@ -448,7 +448,7 @@ outputs:
- { 'path': /var/log/containers/httpd/cinder-api, 'setype': svirt_sandbox_file_t, 'mode': '0750' }
external_upgrade_tasks:
- when: step|int == 1
block:
block: &cinder_online_db_migration
- name: Online data migration for Cinder
command: "{{ container_cli }} exec cinder_api cinder-manage db online_data_migrations"
delegate_to: "{{ groups['cinder_api'][0] }}"
@ -470,6 +470,9 @@ outputs:
- cinder_api
- cinder_api_cron
tripleo_delegate_to: "{{ groups['cinder_api'] | default([]) }}"
external_update_tasks:
- when: step|int == 1
block: *cinder_online_db_migration
external_deploy_tasks:
- name: Clean up legacy Cinder keystone catalog entries
become: true

View File

@ -322,7 +322,7 @@ outputs:
- { 'path': /var/log/containers/httpd/ironic-api, 'setype': svirt_sandbox_file_t, 'mode': '0750' }
external_upgrade_tasks:
- when: step|int == 1
block:
block: &ironic_online_db_migration
- name: Online data migration for Ironic
command: "{{ container_cli }} exec ironic_api ironic-dbsync --config-file /etc/ironic/ironic.conf online_data_migrations"
delegate_to: "{{ groups['ironic_api'][0] }}"
@ -330,3 +330,6 @@ outputs:
tags:
- online_upgrade
- online_upgrade_ironic
external_update_tasks:
- when: step|int == 1
block: *ironic_online_db_migration

View File

@ -263,7 +263,7 @@ outputs:
state: yes
external_upgrade_tasks:
- when: step|int == 1
block:
block: &nova_online_db_migration
- name: Online data migration for Nova
command: "{{ container_cli }} exec nova_conductor nova-manage db online_data_migrations"
delegate_to: "{{ groups['nova_conductor'][0] }}"
@ -285,3 +285,6 @@ outputs:
tripleo_containers_to_stop:
- nova_conductor
tripleo_delegate_to: "{{ groups['nova_conductor'] | default([]) }}"
external_update_tasks:
- when: step|int == 1
block: *nova_online_db_migration