fix type error to streamline single-replica mariadb startup
The mariadb startup script was trying to optimize the single-replica case but missed the fact that the variable it was checking was a string rather than an int. Converting it to an int before doing the comparison makes it work as expected. Change-Id: I0f920b52c5cc92672a71ee3db3d7f8e5700fb709 Signed-off-by: Chris Friesen <chris.friesen@windriver.com> Story: 2004712 Task: 29385
This commit is contained in:
parent
cf67244052
commit
ab3945fcc7
|
@ -19,6 +19,7 @@ Patch01: 0001-gnocchi-chart-updates.patch
|
||||||
Patch02: Mariadb-Support-adoption-of-running-single-node-mari.patch
|
Patch02: Mariadb-Support-adoption-of-running-single-node-mari.patch
|
||||||
Patch03: Mariadb-Share-container-PID-namespaces-under-docker.patch
|
Patch03: Mariadb-Share-container-PID-namespaces-under-docker.patch
|
||||||
Patch04: 0004-Allow-multiple-containers-per-daemonset-pod.patch
|
Patch04: 0004-Allow-multiple-containers-per-daemonset-pod.patch
|
||||||
|
Patch05: fix-type-error-to-streamline-single-replica-mariadb-.patch
|
||||||
|
|
||||||
BuildRequires: helm
|
BuildRequires: helm
|
||||||
|
|
||||||
|
@ -31,6 +32,7 @@ Openstack Helm Infra charts
|
||||||
%patch02 -p1
|
%patch02 -p1
|
||||||
%patch03 -p1
|
%patch03 -p1
|
||||||
%patch04 -p1
|
%patch04 -p1
|
||||||
|
%patch05 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# initialize helm and build the toolkit
|
# initialize helm and build the toolkit
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
From d983c89dbce840fad50f49e4253ecc7930f15338 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Chris Friesen <chris.friesen@windriver.com>
|
||||||
|
Date: Wed, 6 Feb 2019 17:19:39 -0600
|
||||||
|
Subject: [PATCH] fix type error to streamline single-replica mariadb startup
|
||||||
|
|
||||||
|
The mariadb startup script was trying to optimize the single-replica
|
||||||
|
case but missed the fact that the variable it was checking was a
|
||||||
|
string rather than an int.
|
||||||
|
|
||||||
|
Converting it to an int before doing the comparison makes it work
|
||||||
|
as expected.
|
||||||
|
|
||||||
|
Change-Id: I8612e9e8ef5ec8ff61ecf0782f262a5feafd501a
|
||||||
|
Signed-off-by: Chris Friesen <chris.friesen@windriver.com>
|
||||||
|
---
|
||||||
|
mariadb/templates/bin/_start.py.tpl | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/mariadb/templates/bin/_start.py.tpl b/mariadb/templates/bin/_start.py.tpl
|
||||||
|
index 4d4428c..d0b9c8e 100644
|
||||||
|
--- a/mariadb/templates/bin/_start.py.tpl
|
||||||
|
+++ b/mariadb/templates/bin/_start.py.tpl
|
||||||
|
@@ -729,7 +729,7 @@ elif get_cluster_state() == 'init':
|
||||||
|
run_mysqld()
|
||||||
|
elif get_cluster_state() == 'live':
|
||||||
|
logger.info("Cluster has been running starting restore/rejoin")
|
||||||
|
- if not mariadb_replicas > 1:
|
||||||
|
+ if not int(mariadb_replicas) > 1:
|
||||||
|
logger.info(
|
||||||
|
"There is only a single node in this cluster, we are good to go")
|
||||||
|
update_grastate_on_restart()
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
Loading…
Reference in New Issue