loadbalancer: fix MySQL timeout HAproxy config
authorEmilien Macchi <emilien@redhat.com>
Mon, 14 Sep 2015 16:56:41 +0000 (12:56 -0400)
committerEmilien Macchi <emilien@redhat.com>
Thu, 1 Oct 2015 20:57:28 +0000 (20:57 +0000)
Current HAproxy config is broken for MySQL timeout parameters.
This is what we have today by default in HAproxy logs:
--------------
[WARNING] 238/115010 (13878) : config : missing timeouts for proxy
'mysql'.
| While not properly invalid, you will certainly encounter various
problems
| with such a configuration. To fix this, please ensure that all
following
| timeouts are set to a non-zero value: 'client', 'connect', 'server'.
--------------

This patch aims to:
* Use the correct parameters to configure puppetlabs-haproxy
* Update the database timeouts to higher values to prevent the
services from disconnecting too frequently by setting the Galera HAProxy
timeout to 90 minutes.

Change-Id: I06dd4bf81d4f4fd3c01bb681f6f0b3152f2b8eea

manifests/loadbalancer.pp

index ed2a629..b4b4301 100644 (file)
@@ -918,15 +918,17 @@ class tripleo::loadbalancer (
 
   if $mysql_clustercheck {
     $mysql_listen_options = {
-        'option'      => [ 'tcpka', 'httpchk' ],
-        'timeout'     => [ 'client 0', 'server 0' ],
-        'stick-table' => 'type ip size 1000',
-        'stick'       => 'on dst',
+      'option'         => [ 'tcpka', 'httpchk' ],
+      'timeout client' => '90m',
+      'timeout server' => '90m',
+      'stick-table'    => 'type ip size 1000',
+      'stick'          => 'on dst',
     }
     $mysql_member_options = ['check', 'inter 2000', 'rise 2', 'fall 5', 'backup', 'port 9200', 'on-marked-down shutdown-sessions']
   } else {
     $mysql_listen_options = {
-        'timeout'     => [ 'client 0', 'server 0' ],
+      'timeout client' => '90m',
+      'timeout server' => '90m',
     }
     $mysql_member_options = ['check', 'inter 2000', 'rise 2', 'fall 5', 'backup']
   }