6c037790f2
Ansible 2.14.3 introduced a change that broke the method used for
restarting MariaDB and RabbitMQ serially [1][2]. In
I57425680a4cdbf0daeb9b2cc35920f1b933aa4a8 we limited to 2.14.2 to work
around this. Ansible upstream claim this behaviour was unintentional,
and will not fix it.
This change moves to a different approach where we use separate plays
with a 'serial' keyword to execute the restart.
This change also removes the restriction on the maximum supported
version of 2.14.2 on ansible-core - any 2.14 release is now supported.
[1] 65366f663d
[2] https://github.com/ansible/ansible/issues/80848
Depends-On: https://review.opendev.org/c/openstack/kolla/+/884208
Change-Id: I5a12670d07077d24047aaff57ce8d33ccf7156ff
73 lines
1.5 KiB
YAML
73 lines
1.5 KiB
YAML
---
|
|
# For MariaDB we need to be careful about restarting services, to avoid losing quorum.
|
|
- name: Apply role mariadb
|
|
gather_facts: false
|
|
hosts:
|
|
- mariadb
|
|
- '&enable_mariadb_True'
|
|
tags:
|
|
- mariadb
|
|
tasks:
|
|
- import_role:
|
|
name: mariadb
|
|
|
|
- name: Restart mariadb services
|
|
gather_facts: false
|
|
hosts:
|
|
- mariadb_restart
|
|
- '&enable_mariadb_True'
|
|
# Restart in batches
|
|
serial: "33%"
|
|
tags:
|
|
- mariadb
|
|
tasks:
|
|
- import_role:
|
|
name: mariadb
|
|
tasks_from: restart_services.yml
|
|
|
|
- name: Start mariadb services
|
|
gather_facts: false
|
|
hosts:
|
|
- mariadb_start
|
|
- '&enable_mariadb_True'
|
|
# Start in batches
|
|
serial: "33%"
|
|
tags:
|
|
- mariadb
|
|
tasks:
|
|
- import_role:
|
|
name: mariadb
|
|
tasks_from: restart_services.yml
|
|
|
|
- name: Restart bootstrap mariadb service
|
|
gather_facts: false
|
|
hosts:
|
|
- mariadb_bootstrap_restart
|
|
- '&enable_mariadb_True'
|
|
tags:
|
|
- mariadb
|
|
tasks:
|
|
- import_role:
|
|
name: mariadb
|
|
tasks_from: restart_services.yml
|
|
|
|
- name: Apply mariadb post-configuration
|
|
gather_facts: false
|
|
hosts:
|
|
- mariadb
|
|
- '&enable_mariadb_True'
|
|
tags:
|
|
- mariadb
|
|
tasks:
|
|
- name: Include mariadb post-deploy.yml
|
|
include_role:
|
|
name: mariadb
|
|
tasks_from: post-deploy.yml
|
|
when: kolla_action in ['deploy', 'reconfigure', 'upgrade']
|
|
|
|
- name: Include mariadb post-upgrade.yml
|
|
include_role:
|
|
name: mariadb
|
|
tasks_from: post-upgrade.yml
|
|
when: kolla_action == 'upgrade'
|