From 848f392b3a56b02e135a5df4579b9599ddbbc5f9 Mon Sep 17 00:00:00 2001 From: "Markin, Sergiy (sm515x)" Date: Mon, 14 Mar 2022 13:49:33 -0500 Subject: [PATCH] [DATABASE] MariaDB de-clustering Adjust chart behavior in case only one mariadb instance is present and replication is disabled. Change-Id: Ifa540580cf9d5755b83dbb949555ec814dda2744 --- mariadb/Chart.yaml | 2 +- mariadb/templates/bin/_readiness.sh.tpl | 3 ++- releasenotes/notes/mariadb.yaml | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mariadb/Chart.yaml b/mariadb/Chart.yaml index 02eb7d49e..a1e182184 100644 --- a/mariadb/Chart.yaml +++ b/mariadb/Chart.yaml @@ -15,7 +15,7 @@ apiVersion: v1 appVersion: v10.2.31 description: OpenStack-Helm MariaDB name: mariadb -version: 0.2.12 +version: 0.2.13 home: https://mariadb.com/kb/en/ icon: http://badges.mariadb.org/mariadb-badge-180x60.png sources: diff --git a/mariadb/templates/bin/_readiness.sh.tpl b/mariadb/templates/bin/_readiness.sh.tpl index fae9172c6..2a02eb828 100644 --- a/mariadb/templates/bin/_readiness.sh.tpl +++ b/mariadb/templates/bin/_readiness.sh.tpl @@ -36,7 +36,7 @@ mysql_status_query () { if ! $MYSQL -e 'select 1' > /dev/null 2>&1 ; then exit 1 fi - +{{- if gt .Values.pod.replicas.server 1.0 }} if [ "x$(mysql_status_query wsrep_ready)" != "xON" ]; then # WSREP says the node can receive queries exit 1 @@ -56,3 +56,4 @@ if [ "x$(mysql_status_query wsrep_local_state_comment)" != "xSynced" ]; then # WSREP not synced exit 1 fi +{{- end }} \ No newline at end of file diff --git a/releasenotes/notes/mariadb.yaml b/releasenotes/notes/mariadb.yaml index ab06752f5..c7841bf97 100644 --- a/releasenotes/notes/mariadb.yaml +++ b/releasenotes/notes/mariadb.yaml @@ -28,4 +28,5 @@ mariadb: - 0.2.10 Fix Python exceptions - 0.2.11 Enhance mariadb backup - 0.2.12 Remove set -x + - 0.2.13 Adjust readiness.sh in single node and no replication case ...