Allow galera wsrep_provider_options to be customised

This patch introduces galera_wsrep_provider_options as a list of
options instead of only catering for changing the gcache.size
option. This allows the deployer to change any number of the
wsrep_provider_options available.

Note: The variable galera_gcache_size is respected in this patch
but if galera_wsrep_provider_options is customised by a deployer
then the custom list must include reference to galera_gcache_size
for it to be respected.

DocImpact
Closes-Bug: #1464699
Co-Authored-By: Ian Cordasco <ian.cordasco@rackspace.com>
Change-Id: I78a5a1d344729fdc06636b1c6dade63a7ba59e94
This commit is contained in:
Jesse Pretorius
2015-06-12 16:00:50 +01:00
parent e6da43ac27
commit 999fc102d1
3 changed files with 12 additions and 2 deletions

View File

@@ -22,6 +22,7 @@ galera_monitoring_user: monitoring
galera_monitoring_user_password: ""
galera_root_user: root
# WARNING: This option is deprecated and will be removed in v12.0
galera_gcache_size: 1024M
galera_max_heap_table_size: 32M
@@ -43,6 +44,8 @@ galera_wsrep_node_incoming_address: "{{ galera_wsrep_address }}"
galera_wsrep_slave_threads: "{{ ansible_processor_vcpus }}"
galera_wsrep_retry_autocommit: 3
galera_wsrep_debug: 0
galera_wsrep_provider_options:
- { option: "gcache.size", value: "{{ galera_gcache_size }}" }
# Galera GPG Keys
galera_gpg_keys:

View File

@@ -3,7 +3,13 @@
[mysqld]
# Path to Galera library
wsrep_provider = /usr/lib/galera/libgalera_smm.so
wsrep_provider_options = "gcache.size = {{ galera_gcache_size }}"
{% if galera_wsrep_provider_options is defined %}
wsrep_provider_options = "
{%- for item in galera_wsrep_provider_options -%}
{{ item.option }} = {{ item.value }}{% if not loop.last %}; {% endif -%}
{%- endfor -%}
"
{% endif %}
# Cluster connection URL contains the IPs of node#1, node#2 and node#3
wsrep_cluster_address = gcomm://{{ galera_wsrep_cluster_address }}

View File

@@ -302,9 +302,10 @@ echo "nova_virt_type: ${NOVA_VIRT_TYPE}" | tee -a /etc/openstack_deploy/user_var
echo "tempest_public_subnet_cidr: ${TEMPEST_FLAT_CIDR}" | tee -a /etc/openstack_deploy/user_variables.yml
# Minimize galera cache
echo 'galera_gcache_size: 32M' | tee -a /etc/openstack_deploy/user_variables.yml
echo 'galera_innodb_buffer_pool_size: 512M' | tee -a /etc/openstack_deploy/user_variables.yml
echo 'galera_innodb_log_buffer_size: 32M' | tee -a /etc/openstack_deploy/user_variables.yml
echo 'galera_wsrep_provider_options:
- { option: "gcache.size", value: "32M" }' | tee -a /etc/openstack_deploy/user_variables.yml
# Set the running kernel as the required kernel
echo "required_kernel: $(uname --kernel-release)" | tee -a /etc/openstack_deploy/user_variables.yml