From 8bc03bf88cb7272fe2c206673d3d0aeefb97321d Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Tue, 23 Oct 2018 13:01:38 -0500 Subject: [PATCH] MariaDB: Move to use mariabackup instead of xtrabackup-v2 This PS moves to use mariabackup instead of xtrabackup-v2, for info see: * https://mariadb.com/kb/en/library/upgrading-from-mariadb-102-to-mariadb-103/#mariadb-backup-and-percona-xtrabackup * https://mariadb.com/kb/en/library/mariabackup-overview/#about-mariabackup Additionally the readyness script is updated to match the order of validation tests described in the mariadb/galera documentation. Change-Id: I031c63d6305f1514ffdd53d77d621bc7edc0e68c Signed-off-by: Pete Birley --- mariadb/templates/bin/_readiness.sh.tpl | 12 ++++++++---- mariadb/templates/etc/_00-base.cnf.tpl | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/mariadb/templates/bin/_readiness.sh.tpl b/mariadb/templates/bin/_readiness.sh.tpl index e35c5a1a5..8f3d13286 100644 --- a/mariadb/templates/bin/_readiness.sh.tpl +++ b/mariadb/templates/bin/_readiness.sh.tpl @@ -33,12 +33,16 @@ if ! $MYSQL -e 'select 1' > /dev/null 2>&1 ; then exit 1 fi -if [ "x$(mysql_status_query wsrep_cluster_status)" != "xPrimary" ]; then - # Not in primary cluster +if [ "x$(mysql_status_query wsrep_ready)" != "xON" ]; then + # WSREP says the node can receive queries exit 1 fi -if [ "x$(mysql_status_query wsrep_ready)" != "xON" ]; then - # WSREP not ready +if [ "x$(mysql_status_query wsrep_connected)" != "xON" ]; then + # WSREP connected + exit 1 +fi +if [ "x$(mysql_status_query wsrep_cluster_status)" != "xPrimary" ]; then + # Not in primary cluster exit 1 fi if [ "x$(mysql_status_query wsrep_local_state_comment)" != "xSynced" ]; then diff --git a/mariadb/templates/etc/_00-base.cnf.tpl b/mariadb/templates/etc/_00-base.cnf.tpl index 068d11306..fc0b07994 100644 --- a/mariadb/templates/etc/_00-base.cnf.tpl +++ b/mariadb/templates/etc/_00-base.cnf.tpl @@ -93,8 +93,9 @@ wsrep_on=1 wsrep_provider=/usr/lib/galera/libgalera_smm.so wsrep_provider_options="gmcast.listen_addr=tcp://0.0.0.0:{{ tuple "oslo_db" "direct" "wsrep" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}" wsrep_slave_threads=12 +# FIX_ME(portdirect): https://mariadb.com/kb/en/library/mariabackup-overview/#granting-privileges-for-ssts wsrep_sst_auth=root:{{ .Values.endpoints.oslo_db.auth.admin.password }} -wsrep_sst_method=xtrabackup-v2 +wsrep_sst_method=mariabackup [mysqldump] max-allowed-packet=16M