Skip to content

Commit 4b25c9b

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "mariadb: use add_host to include inactive hosts in shard grouping" into stable/wallaby
2 parents fc3b019 + c6b27b2 commit 4b25c9b

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

ansible/group_vars/all.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,9 @@ mariadb_clustercheck_port: "4569"
381381
mariadb_monitor_user: "haproxy"
382382
mariadb_default_database_shard_id: 0
383383
mariadb_default_database_shard_hosts: "{% set default_shard = [] %}{% for host in groups['mariadb'] %}{% if hostvars[host]['mariadb_shard_id'] is not defined or hostvars[host]['mariadb_shard_id'] == mariadb_default_database_shard_id %}{{ default_shard.append(host) }}{% endif %}{% endfor %}{{ default_shard }}"
384+
mariadb_shard_id: "{{ mariadb_default_database_shard_id }}"
385+
mariadb_shard_name: "shard_{{ mariadb_shard_id }}"
386+
mariadb_shard_group: "mariadb_{{ mariadb_shard_name }}"
384387
mariadb_loadbalancer: "haproxy"
385388

386389
masakari_api_port: "15868"

ansible/roles/mariadb/defaults/main.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,4 @@ enable_mariadb_clustercheck: "{{ enable_haproxy }}"
123123
####################
124124
# Sharding
125125
####################
126-
mariadb_shard_id: "{{ mariadb_default_database_shard_id }}"
127-
mariadb_shard_name: "shard_{{ mariadb_shard_id }}"
128-
mariadb_shard_group: "mariadb_{{ mariadb_shard_name }}"
129126
mariadb_shard_database_user: "{% if mariadb_loadbalancer == 'haproxy' %}{{ database_user }}{% else %}root_{{ mariadb_shard_name }}{% endif %}"
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
22
- name: Group MariaDB hosts based on shards
3-
group_by:
4-
key: "{{ mariadb_shard_group }}"
3+
add_host:
4+
name: "{{ item }}"
5+
groups: "{{ hostvars[item]['mariadb_shard_group'] }}"
6+
loop: "{{ groups['mariadb'] }}"
57
changed_when: false
68

79
- include_tasks: "{{ kolla_action }}.yml"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
fixes:
3+
- |
4+
Fixes the generation of ``wsrep_cluster_address`` in ``galera.cnf``
5+
when ``--limit`` is used while deploying MariaDB nodes.
6+
`LP#1947589 <https://bugs.launchpad.net/kolla-ansible/+bug/1947589>`__

0 commit comments

Comments
 (0)