9f14ad651a
These affected both deploy (and reconfigure) and upgrade resulting in WSREP issues, failed deploys or need to recover the cluster. This patch makes sure k-a does not abruptly terminate nodes to break cluster. This is achieved by cleaner separation between stages (bootstrap, restart current, deploy new) and 3 phases for restarts (to keep the quorum). Upgrade actions, which operate on a healthy cluster, went to its section. Service restart was refactored. We no longer rely on the master/slave distinction as all nodes are masters in Galera. Closes-bug: #1857908 Closes-bug: #1859145 Change-Id: I83600c69141714fc412df0976f49019a857655f5
27 lines
719 B
YAML
27 lines
719 B
YAML
---
|
|
- include_tasks: deploy.yml
|
|
|
|
- name: Run upgrade in MariaDB container
|
|
vars:
|
|
service_name: "mariadb"
|
|
service: "{{ mariadb_services[service_name] }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "start_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
detach: False
|
|
dimensions: "{{ service.dimensions }}"
|
|
environment:
|
|
KOLLA_UPGRADE:
|
|
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
|
DB_HOST: "{{ api_interface_address }}"
|
|
DB_PORT: "{{ mariadb_port }}"
|
|
DB_ROOT_PASSWORD: "{{ database_password }}"
|
|
image: "{{ service.image }}"
|
|
labels:
|
|
UPGRADE:
|
|
name: "upgrade_mariadb"
|
|
restart_policy: no
|
|
volumes: "{{ service.volumes }}"
|
|
no_log: true
|