Update approach for passing wsrep_provider_options
Remove wsrep_provider_options="gcache.size = 256M" as
it was never applied
Related-Prod: PROD-35931
Change-Id: I0f09fd0ae2ef5b424658d87c60946e175387bca9
diff --git a/galera/files/my.cnf b/galera/files/my.cnf
index 481ff12..1a1158b 100644
--- a/galera/files/my.cnf
+++ b/galera/files/my.cnf
@@ -76,11 +76,8 @@
wsrep_sst_method=xtrabackup-v2
wsrep_sst_auth={{ service.sst.get('user', service.admin.user) }}:{{ service.sst.get('password', service.admin.password) }}
wsrep_node_address={{ service.bind.address }}
-wsrep_provider_options="gcache.size = 256M"
-wsrep_provider_options="gmcast.listen_addr = tcp://{{ service.bind.address }}:4567"
{% if service.get('ssl', {}).get('enabled', False) %}
-wsrep_provider_options="socket.ssl=yes;socket.ssl_key={{ service.ssl.key_file }};socket.ssl_cert={{ service.ssl.cert_file }};socket.ssl_ca={{ service.ssl.ca_file }}"
{%- if service.ssl.ciphers is defined %}
{%- set _ciphers = [] %}
{%- for cipher_name, cipher in service.ssl.get('ciphers', {}).iteritems() %}
@@ -98,9 +95,15 @@
ssl-cert={{ service.ssl.cert_file }}
ssl-key={{ service.ssl.key_file }}
{% endif %}
-{%- if service.wsrep_provider_options is defined %}
-wsrep_provider_options="{% for opt,val in service.wsrep_provider_options.iteritems() %}{{ opt }}={{val}}{% if not loop.last %};{% endif %}{% endfor %}"
+wsrep_provider_options="
+{%- if service.get('ssl', {}).get('enabled', False) -%}
+socket.ssl=yes;socket.ssl_key={{ service.ssl.key_file }};socket.ssl_cert={{ service.ssl.cert_file }};socket.ssl_ca={{ service.ssl.ca_file }};
+{%- else -%}
+gmcast.listen_addr = tcp://{{ service.bind.address }}:4567;
{%- endif %}
+{%- if service.wsrep_provider_options is defined -%}
+{% for opt,val in service.wsrep_provider_options.iteritems() %}{{ opt }}={{val}}{% if not loop.last %};{% endif %}{% endfor %}
+{%- endif %}"
[xtrabackup]
parallel={{ service.get('xtrabackup_parallel', 4) }}
diff --git a/galera/files/my.cnf.init b/galera/files/my.cnf.init
index 6d03811..c062b3f 100644
--- a/galera/files/my.cnf.init
+++ b/galera/files/my.cnf.init
@@ -61,18 +61,21 @@
wsrep_sst_method=xtrabackup-v2
wsrep_sst_auth={{ service.sst.get('user', service.admin.user) }}:{{ service.sst.get('password', service.admin.password) }}
wsrep_node_address={{ service.bind.address }}
-wsrep_provider_options="gcache.size = 256M"
-wsrep_provider_options="gmcast.listen_addr = tcp://{{ service.bind.address }}:4567"
{% if service.get('ssl', {}).get('enabled', False) %}
-wsrep_provider_options="socket.ssl=yes;socket.ssl_key={{ service.ssl.key_file }};socket.ssl_cert={{ service.ssl.cert_file }};socket.ssl_ca={{ service.ssl.ca_file }}"
ssl-ca={{ service.ssl.ca_file }}
ssl-cert={{ service.ssl.cert_file }}
ssl-key={{ service.ssl.key_file }}
{% endif %}
-{%- if service.wsrep_provider_options is defined %}
-wsrep_provider_options="{% for opt,val in service.wsrep_provider_options.iteritems() %}{{ opt }}={{val}}{% if not loop.last %};{% endif %}{% endfor %}"
+wsrep_provider_options="
+{%- if service.get('ssl', {}).get('enabled', False) -%}
+socket.ssl=yes;socket.ssl_key={{ service.ssl.key_file }};socket.ssl_cert={{ service.ssl.cert_file }};socket.ssl_ca={{ service.ssl.ca_file }};
+{%- else -%}
+gmcast.listen_addr = tcp://{{ service.bind.address }}:4567;
{%- endif %}
+{%- if service.wsrep_provider_options is defined -%}
+{% for opt,val in service.wsrep_provider_options.iteritems() %}{{ opt }}={{val}}{% if not loop.last %};{% endif %}{% endfor %}
+{%- endif %}"
[xtrabackup]
parallel={{ service.get('xtrabackup_parallel', 4) }}