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>
This commit is contained in:
Chris Friesen 2019-02-06 17:19:39 -06:00
parent 25e4e5662e
commit d99b1412e2

@ -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()