Allow to tune wsrep_provider_options
galera:
slave:
wsrep_provider_options:
evs.inactive_check_period: PT2.5S
evs.inactive_timeout: PT30S
gmcast.peer_timeout: PT9S
Change-Id: Ic80df09050c73731a71062b21be450d8e80995dd
Related-Prod: PROD-35705
diff --git a/README.rst b/README.rst
index 3e44619..9f17ac0 100644
--- a/README.rst
+++ b/README.rst
@@ -101,6 +101,16 @@
cert: << body of cert >>
cacert_chain: << body of ca certs chain >>
+Custom wsrep_provider_options:
+
+.. code-block:: yaml
+
+ galera:
+ slave or master:
+ wsrep_provider_options:
+ evs.inactive_check_period: "PT2.5S"
+ evs.inactive_timeout: "PT30S"
+ gmcast.peer_timeout: "PT9S"
Additional mysql users:
diff --git a/galera/files/my.cnf b/galera/files/my.cnf
index b55530f..5cab02a 100644
--- a/galera/files/my.cnf
+++ b/galera/files/my.cnf
@@ -98,6 +98,9 @@
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 %}"
+{%- endif %}
[xtrabackup]
parallel={{ service.get('xtrabackup_parallel', 4) }}
diff --git a/galera/files/my.cnf.init b/galera/files/my.cnf.init
index 23fd701..514f6e5 100644
--- a/galera/files/my.cnf.init
+++ b/galera/files/my.cnf.init
@@ -70,6 +70,9 @@
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 %}"
+{%- endif %}
[xtrabackup]
parallel={{ service.get('xtrabackup_parallel', 4) }}
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index 9761585..1f05f1c 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -40,6 +40,9 @@
virtualenv $VENV_DIR
source ${VENV_DIR}/bin/activate
python -m pip install salt${PIP_SALT_VERSION}
+ if [[ -f ${CURDIR}/test-requirements.txt ]]; then
+ python -m pip install -r ${CURDIR}/test-requirements.txt
+ fi
}
setup_mock_bin() {
diff --git a/tests/test-requirements.txt b/tests/test-requirements.txt
new file mode 100644
index 0000000..bc7dc7f
--- /dev/null
+++ b/tests/test-requirements.txt
@@ -0,0 +1,4 @@
+jsonschema
+reno
+setuptools<45.0.0
+msgpack<1.0.0