Merge "mariadb: add mariadb_datadir_volume parameter"

This commit is contained in:
Zuul 2023-04-19 08:27:42 +00:00 committed by Gerrit Code Review
commit f5991df02b
3 changed files with 9 additions and 1 deletions

View File

@ -392,6 +392,8 @@ mariadb_sst_port: "4444"
mariadb_clustercheck_port: "4569" mariadb_clustercheck_port: "4569"
mariadb_monitor_user: "{{ 'monitor' if enable_proxysql | bool else 'haproxy' }}" mariadb_monitor_user: "{{ 'monitor' if enable_proxysql | bool else 'haproxy' }}"
mariadb_datadir_volume: "mariadb"
mariadb_default_database_shard_id: 0 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_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_id: "{{ mariadb_default_database_shard_id }}"

View File

@ -82,7 +82,7 @@ mariadb_default_volumes:
- "{{ node_config_directory }}/mariadb/:{{ container_config_directory }}/:ro" - "{{ node_config_directory }}/mariadb/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro" - "/etc/localtime:/etc/localtime:ro"
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}" - "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
- "mariadb:/var/lib/mysql" - "{{ mariadb_datadir_volume }}:/var/lib/mysql"
- "kolla_logs:/var/log/kolla/" - "kolla_logs:/var/log/kolla/"
mariadb_clustercheck_default_volumes: mariadb_clustercheck_default_volumes:
- "{{ node_config_directory }}/mariadb-clustercheck/:{{ container_config_directory }}/:ro" - "{{ node_config_directory }}/mariadb-clustercheck/:{{ container_config_directory }}/:ro"

View File

@ -0,0 +1,6 @@
---
features:
- |
With the parameter ``mariadb_datadir_volume`` it is possible
to use a directory as volume for the mariadb service. By default,
a volume named mariadb is used (the previous default).