From 5fe0b66aa9ab4877d25fa164d210734a868e1042 Mon Sep 17 00:00:00 2001 From: Jungsub Shin Date: Wed, 19 Dec 2018 11:42:46 +0900 Subject: [PATCH] helm: Use MYSQL_FLAVOR to set flavor instead of EXTRA_MY_CNF mysqlctl uses env MYSQL_FLAVOR to set MySQL Flavor. But helper template use EXTRA_MY_CNF to set MySQL Flavor. This cause a bug when use mariadb or mariadb103. mysqlctl set mariadb.conf or mariadb103.conf and 'mysql56.conf' in my.cnf. And this wrong config cause failure to run mariadb or mariadb103. Signed-off-by: Jungsub Shin --- helm/vitess/templates/_helpers.tpl | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/helm/vitess/templates/_helpers.tpl b/helm/vitess/templates/_helpers.tpl index 3463c7916d7..f83683c0e4d 100644 --- a/helm/vitess/templates/_helpers.tpl +++ b/helm/vitess/templates/_helpers.tpl @@ -103,26 +103,27 @@ nodeAffinity: {{- define "mycnf-exec" -}} if [ "$VT_DB_FLAVOR" = "percona" ]; then - FLAVOR_MYCNF=/vt/config/mycnf/master_mysql56.cnf + MYSQL_FLAVOR=Percona elif [ "$VT_DB_FLAVOR" = "mysql" ]; then - FLAVOR_MYCNF=/vt/config/mycnf/master_mysql56.cnf + MYSQL_FLAVOR=MySQL56 elif [ "$VT_DB_FLAVOR" = "mysql56" ]; then - FLAVOR_MYCNF=/vt/config/mycnf/master_mysql56.cnf + MYSQL_FLAVOR=MySQL56 elif [ "$VT_DB_FLAVOR" = "maria" ]; then - FLAVOR_MYCNF=/vt/config/mycnf/master_mariadb.cnf + MYSQL_FLAVOR=MariaDB elif [ "$VT_DB_FLAVOR" = "mariadb" ]; then - FLAVOR_MYCNF=/vt/config/mycnf/master_mariadb.cnf + MYSQL_FLAVOR=MariaDB elif [ "$VT_DB_FLAVOR" = "mariadb103" ]; then - FLAVOR_MYCNF=/vt/config/mycnf/master_mariadb103.cnf + MYSQL_FLAVOR=MariaDB103 fi -export EXTRA_MY_CNF="$FLAVOR_MYCNF:/vtdataroot/tabletdata/report-host.cnf:/vt/config/mycnf/rbr.cnf" +export MYSQL_FLAVOR +export EXTRA_MY_CNF="/vtdataroot/tabletdata/report-host.cnf:/vt/config/mycnf/rbr.cnf" {{ if . }} for filename in /vt/userconfig/*.cnf; do