Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save michaeltchapman/b6ca87545c16e474206f7ff38f85ce8d to your computer and use it in GitHub Desktop.
Save michaeltchapman/b6ca87545c16e474206f7ff38f85ce8d to your computer and use it in GitHub Desktop.
$nodecount = count($controller_node_ips)
$cmd = "mysql -e \"show status LIKE 'wsrep_cluster_size'\" | grep ${nodecount}"
exec { 'validate_galera_connection':
path => '/usr/bin:/bin:/usr/sbin:/sbin',
provider => shell,
command => $cmd,
tries => 20,
timeout => 30,
try_sleep => 10,
require => File['/etc/sysconfig/clustercheck'],
before => Exec['galera-ready']
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment