From 626d7d6ef6cf79452e0309c744b0e294fb11ae76 Mon Sep 17 00:00:00 2001 From: Chris Wedgwood Date: Wed, 21 Mar 2018 21:00:01 +0000 Subject: [PATCH] MariaDB: Update to 10.2.13; patching wsrep_sst_xtrabackup-v2 Recent versions of MariaDB (10.1.31, 10.2.13) have a regression that breaks clustering. See https://github.com/MariaDB/server/pull/457 and https://github.com/MariaDB/server/commit/4e6dab94d0931eafba502f5a91da29a54e75bb33 for an in depth explanation. We need 10.2.13+ for Barbican to function correctly (see bug #1734329) but we also need the fix above to support MariaDB clustering. This work-around can be removed later on when MariaDB 10.2.x releases contain the needed script fix. Thanks to Sam Yample for helping track this down. Change-Id: Ifd09d7effe7d382074ca9e6678df36bdd4bce0af --- mariadb/templates/bin/_start.sh.tpl | 6 ++++++ mariadb/values.yaml | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/mariadb/templates/bin/_start.sh.tpl b/mariadb/templates/bin/_start.sh.tpl index 945e3f40b2..96e4b47f86 100644 --- a/mariadb/templates/bin/_start.sh.tpl +++ b/mariadb/templates/bin/_start.sh.tpl @@ -17,6 +17,12 @@ limitations under the License. set -xe +# MariaDB 10.2.13 has a regression which breaks clustering, patch +# around this for now +if /usr/sbin/mysqld --version | grep --silent 10.2.13 ; then + sed -i 's^LSOF_OUT=.*^LSOF_OUT=$(lsof -sTCP:LISTEN -i TCP:${PORT} -a -c nc -c socat -F c 2> /dev/null || :)^' /usr/bin/wsrep_sst_xtrabackup-v2 +fi + # Bootstrap database CLUSTER_INIT_ARGS="" CLUSTER_CONFIG_PATH=/etc/mysql/conf.d/10-cluster-config.cnf diff --git a/mariadb/values.yaml b/mariadb/values.yaml index 6c70d03eac..8220945f27 100644 --- a/mariadb/values.yaml +++ b/mariadb/values.yaml @@ -14,8 +14,11 @@ images: tags: - mariadb: docker.io/mariadb:10.1.23 - prometheus_create_mysql_user: docker.io/mariadb:10.1.23 + # NOTE: if you update from 10.2.13 please look at + # https://review.openstack.org/#/q/Ifd09d7effe7d382074ca9e6678df36bdd4bce0af + # and check whether it's still needed + mariadb: docker.io/mariadb:10.2.13 + prometheus_create_mysql_user: docker.io/mariadb:10.2.13 prometheus_mysql_exporter: docker.io/prom/mysqld-exporter:v0.10.0 prometheus_mysql_exporter_helm_tests: docker.io/openstackhelm/heat:newton dep_check: quay.io/stackanetes/kubernetes-entrypoint:v0.3.0