diff options
author | Giulio Fidente <gfidente@redhat.com> | 2015-05-20 10:19:28 -0400 |
---|---|---|
committer | Giulio Fidente <gfidente@redhat.com> | 2015-05-20 10:41:47 -0400 |
commit | 5390499e692a3a12a60507e359384c44b1ea6784 (patch) | |
tree | f6cd026b40e24ac43713d6226ba4e74e8d2bbbd3 /puppet/manifests | |
parent | 43d4eee72884c23de2aef76436ba2044afdb80e8 (diff) |
Use clustercheck script to control galera-ready
The exec timeout/attempts is configured so that it is
left running for up to 30mins if the command runs but is
unsuccessfull and up to 2h if the command times out.
Change-Id: I4b6b77e878017bf92d7c59c868d393e74405a355
Diffstat (limited to 'puppet/manifests')
-rw-r--r-- | puppet/manifests/overcloud_controller_pacemaker.pp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp index ecd5db5f..179ad913 100644 --- a/puppet/manifests/overcloud_controller_pacemaker.pp +++ b/puppet/manifests/overcloud_controller_pacemaker.pp @@ -113,8 +113,6 @@ if hiera('step') >= 1 { } $galera_nodes = downcase(hiera('galera_node_names', $::hostname)) $galera_nodes_count = count(split($galera_nodes, ',')) - $clustercheck_password = hiera('mysql_clustercheck_password') - $mysql_root_password = hiera('mysql::server::root_password') $mysqld_options = { 'mysqld' => { @@ -193,8 +191,8 @@ if hiera('step') >= 2 { $mongodb_cluster_ready_command = join(suffix(prefix($mongo_node_ips, '/bin/nc -w1 '), ' 27017 < /dev/null'), ' && ') exec { 'mongodb-ready' : command => $mongodb_cluster_ready_command, - timeout => 600, - tries => 60, + timeout => 30, + tries => 180, try_sleep => 10, } mongodb_replset { $mongodb_replset : @@ -239,19 +237,19 @@ if hiera('step') >= 2 { } exec { 'galera-ready' : - command => '/bin/mysql -e "SHOW GLOBAL VARIABLES LIKE \'read_only\'" | /bin/grep -i off', - timeout => 600, - tries => 60, + command => '/usr/bin/clustercheck >/dev/null', + timeout => 30, + tries => 180, try_sleep => 10, - environment => 'HOME=/root', + environment => ["AVAILABLE_WHEN_READONLY=0"], + require => File['/etc/sysconfig/clustercheck'], } file { '/etc/sysconfig/clustercheck' : ensure => file, - content => "MYSQL_USERNAME=clustercheckuser\n -MYSQL_PASSWORD=${clustercheck_password}\n + content => "MYSQL_USERNAME=root\n +MYSQL_PASSWORD=''\n MYSQL_HOST=localhost\n", - require => Exec['galera-ready'], } xinetd::service { 'galera-monitor' : |