Allows customization of the HAProxy default timeouts
authorGiulio Fidente <gfidente@redhat.com>
Thu, 10 Dec 2015 13:19:40 +0000 (14:19 +0100)
committerGiulio Fidente <gfidente@redhat.com>
Thu, 10 Dec 2015 13:19:40 +0000 (14:19 +0100)
Change-Id: I3fdb705bbac26b4bc43a18131407a0a86d36a8a5

manifests/loadbalancer.pp

index e34b01e..7890b06 100644 (file)
 #  The value to use as maxconn in the haproxy default config section.
 #  Defaults to 4096
 #
+# [*haproxy_default_timeout*]
+#  The value to use as timeout in the haproxy default config section.
+#  Defaults to [ 'http-request 10s', 'queue 1m', 'connect 10s', 'client 1m', 'server 1m', 'check 10s' ]
+#
 # [*haproxy_log_address*]
 #  The IPv4, IPv6 or filesystem socket path of the syslog server.
 #  Defaults to '/dev/log'
@@ -250,6 +254,7 @@ class tripleo::loadbalancer (
   $haproxy_service_manage    = true,
   $haproxy_global_maxconn    = 20480,
   $haproxy_default_maxconn   = 4096,
+  $haproxy_default_timeout   = [ 'http-request 10s', 'queue 1m', 'connect 10s', 'client 1m', 'server 1m', 'check 10s' ],
   $haproxy_log_address       = '/dev/log',
   $controller_host           = undef,
   $controller_hosts          = undef,
@@ -646,7 +651,7 @@ class tripleo::loadbalancer (
       'mode'    => 'tcp',
       'log'     => 'global',
       'retries' => '3',
-      'timeout' => [ 'http-request 10s', 'queue 1m', 'connect 10s', 'client 1m', 'server 1m', 'check 10s' ],
+      'timeout' => $haproxy_default_timeout,
       'maxconn' => $haproxy_default_maxconn,
     },
   }