2014-03-27 08:22:29 -04:00
|
|
|
# galera_cluster.inc
|
|
|
|
# ==================
|
|
|
|
#
|
|
|
|
# Description
|
|
|
|
# -----------
|
2019-08-28 07:19:24 +01:00
|
|
|
# Configure galera cluster with $galera_cluster_size (default: 2) nodes.
|
2014-03-27 08:22:29 -04:00
|
|
|
#
|
|
|
|
|
2019-08-28 07:19:24 +01:00
|
|
|
if (!$galera_cluster_size)
|
|
|
|
{
|
|
|
|
# --die ERROR IN TEST: $galera_cluster_size variable must be set
|
|
|
|
--let $galera_cluster_size = 2
|
|
|
|
}
|
|
|
|
|
2014-03-27 08:22:29 -04:00
|
|
|
--source include/galera_init.inc
|
2019-01-23 15:30:00 +04:00
|
|
|
--source include/galera_wait_ready.inc
|
2017-02-08 06:56:00 -08:00
|
|
|
|
2019-08-28 07:19:24 +01:00
|
|
|
--let $_galera_node= $galera_cluster_size
|
|
|
|
|
|
|
|
while ($_galera_node != 1)
|
|
|
|
{
|
|
|
|
--connection node_$_galera_node
|
|
|
|
--source include/galera_wait_ready.inc
|
|
|
|
--source include/have_innodb.inc
|
|
|
|
|
|
|
|
--dec $_galera_node
|
|
|
|
}
|
2019-01-23 15:30:00 +04:00
|
|
|
|
|
|
|
--connection node_1
|