Skip to content

Commit 8109217

Browse files
committed
[mariadb] Start new nodes serially
There seems to be a bug in Galera that causes TASK [mariadb : Check MariaDB service WSREP sync status] to fail. One (in case of 3-node cluster) or more (possible with more-than-3-node clusters) nodes may "lose the race" and get stuck in the "initialized" state of WSREP. This is entirely random as is the case with most race issues. MariaDB service restart on that node will fix the situation but it's unwieldy. The above may happen because Kolla Ansible starts and waits for all new nodes at once. This did not bother the old galera (galera 3) which figured out the ordering for itself and let each node join the cluster properly. The proposed workaround is to start and wait for nodes serially. Change-Id: I449d4c2073d4e3953e9f09725577d2e1c9d563c9 Closes-Bug: #1947485 (cherry picked from commit c94cc4a)
1 parent 829974b commit 8109217

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

ansible/roles/mariadb/handlers/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,14 @@
6868
- bootstrap_host is not defined or bootstrap_host != inventory_hostname
6969
- groups[mariadb_shard_group + '_port_alive_False'] is defined
7070
- inventory_hostname in groups[mariadb_shard_group + '_port_alive_False']
71+
- groups[mariadb_shard_group + '_port_alive_False'].index(inventory_hostname) % 4 == item
7172
- kolla_action != "config"
7273
listen: restart mariadb
74+
loop:
75+
- 0
76+
- 1
77+
- 2
78+
- 3
7379

7480
- name: Ensure MariaDB is running normally on bootstrap host
7581
include_tasks: 'restart_services.yml'
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
fixes:
3+
- |
4+
Fixes an issue with multinode MariaDB deployments which could fail
5+
the playbook execution on WSREP check due to the new behaviour of
6+
Galera 4.
7+
`LP#1947485 <https://launchpad.net/bugs/1947485>`__.

0 commit comments

Comments
 (0)