1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
Description: Fix cluster startup
Without this patch, if all servers start at the same time, under some
circonstances, the "galera_new_cluster" command isn't issue. This patch
fixes the problem.
Author: Thomas Goirand <zigo@debian.org>
Forwarded: no
Last-Update: 2018-12-30
--- puppet-module-michaeltchapman-galera-0.7.1.orig/manifests/init.pp
+++ puppet-module-michaeltchapman-galera-0.7.1/manifests/init.pp
@@ -329,7 +329,14 @@ class galera(
exec { 'bootstrap_galera_cluster':
command => $galera::params::bootstrap_command,
- unless => "nmap -Pn -p ${wsrep_group_comm_port} ${server_list} | grep -q '${wsrep_group_comm_port}/tcp open'",
+ unless => "set -ex # bla
+for i in ${server_list} ; do
+ if nmap -Pn -p ${wsrep_group_comm_port} \$i | grep '${wsrep_group_comm_port}/tcp open' ; then
+ exit 0
+ fi
+done
+exit 1
+",
require => Class['mysql::server::installdb'],
before => Service['mysqld'],
provider => shell,
|