Skip to content
Snippets Groups Projects
Commit ed5ad62a authored by Zuul's avatar Zuul Committed by Gerrit Code Review
Browse files

Merge "mariadb: use add_host to include inactive hosts in shard grouping"

parents 8fee16dc 68cd2a05
No related branches found
No related tags found
No related merge requests found
......@@ -377,6 +377,9 @@ mariadb_clustercheck_port: "4569"
mariadb_monitor_user: "haproxy"
mariadb_default_database_shard_id: 0
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 }}"
mariadb_shard_id: "{{ mariadb_default_database_shard_id }}"
mariadb_shard_name: "shard_{{ mariadb_shard_id }}"
mariadb_shard_group: "mariadb_{{ mariadb_shard_name }}"
mariadb_loadbalancer: "haproxy"
masakari_api_port: "15868"
......
......@@ -123,7 +123,4 @@ enable_mariadb_clustercheck: "{{ enable_haproxy }}"
####################
# Sharding
####################
mariadb_shard_id: "{{ mariadb_default_database_shard_id }}"
mariadb_shard_name: "shard_{{ mariadb_shard_id }}"
mariadb_shard_group: "mariadb_{{ mariadb_shard_name }}"
mariadb_shard_database_user: "{% if mariadb_loadbalancer == 'haproxy' %}{{ database_user }}{% else %}root_{{ mariadb_shard_name }}{% endif %}"
---
- name: Group MariaDB hosts based on shards
group_by:
key: "{{ mariadb_shard_group }}"
add_host:
name: "{{ item }}"
groups: "{{ hostvars[item]['mariadb_shard_group'] }}"
loop: "{{ groups['mariadb'] }}"
changed_when: false
- include_tasks: "{{ kolla_action }}.yml"
---
fixes:
- |
Fixes the generation of ``wsrep_cluster_address`` in ``galera.cnf``
when ``--limit`` is used while deploying MariaDB nodes.
`LP#1947589 <https://bugs.launchpad.net/kolla-ansible/+bug/1947589>`__
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment