Merge "Overcloud: bump HOT version to 2015-04-30"
[apex-tripleo-heat-templates.git] / puppet / manifests / overcloud_controller_pacemaker.pp
index 9184f8b..ce8e81e 100644 (file)
@@ -44,6 +44,8 @@ $non_pcmk_start = hiera('step') >= 4
 
 if hiera('step') >= 1 {
 
+  create_resources(sysctl::value, hiera('sysctl_settings'), {})
+
   if count(hiera('ntp::servers')) > 0 {
     include ::ntp
   }
@@ -57,7 +59,7 @@ if hiera('step') >= 1 {
     haproxy_service_manage => false,
   }
 
-  $pacemaker_cluster_members = regsubst(hiera('controller_node_ips'), ',', ' ', 'G')
+  $pacemaker_cluster_members = downcase(regsubst(hiera('controller_node_names'), ',', ' ', 'G'))
   user { 'hacluster':
    ensure => present,
   } ->
@@ -110,8 +112,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' => {
@@ -190,8 +190,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 :
@@ -236,19 +236,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' :