aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiulio Fidente <gfidente@redhat.com>2016-01-08 16:07:35 +0100
committerGiulio Fidente <gfidente@redhat.com>2016-01-08 18:04:38 +0100
commit106516f16dbbf94b4bc956ffa0da917b433bae78 (patch)
tree4a6879b8a1769150f9cb852ab21300e9f27cc2e2
parent69d44747ecd9f8fb0c171a7b533f8c3a81d89c5d (diff)
Make haproxy balancer default options configurable
Change-Id: Id5e119e0949d27a6e3b3f21ecd5e2eb39f1eeb13
-rw-r--r--manifests/loadbalancer.pp57
1 files changed, 31 insertions, 26 deletions
diff --git a/manifests/loadbalancer.pp b/manifests/loadbalancer.pp
index de995de..c6d7f33 100644
--- a/manifests/loadbalancer.pp
+++ b/manifests/loadbalancer.pp
@@ -39,6 +39,10 @@
# 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_member_options*]
+# The default options to use for the haproxy balancer members.
+# Defaults to [ 'check', 'inter 2000', 'rise 2', 'fall 5' ]
+#
# [*haproxy_log_address*]
# The IPv4, IPv6 or filesystem socket path of the syslog server.
# Defaults to '/dev/log'
@@ -285,6 +289,7 @@ class tripleo::loadbalancer (
$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_member_options = [ 'check', 'inter 2000', 'rise 2', 'fall 5' ],
$haproxy_log_address = '/dev/log',
$controller_host = undef,
$controller_hosts = undef,
@@ -774,7 +779,7 @@ class tripleo::loadbalancer (
ports => '35357',
ipaddresses => hiera('keystone_admin_api_node_ips',$controller_hosts_real),
server_names => $controller_hosts_names_real,
- options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ options => $haproxy_member_options,
}
}
@@ -792,7 +797,7 @@ class tripleo::loadbalancer (
ports => '5000',
ipaddresses => hiera('keystone_public_api_node_ips', $controller_hosts_real),
server_names => $controller_hosts_names_real,
- options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ options => $haproxy_member_options,
}
}
@@ -806,7 +811,7 @@ class tripleo::loadbalancer (
ports => '9696',
ipaddresses => hiera('neutron_api_node_ips', $controller_hosts_real),
server_names => $controller_hosts_names_real,
- options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ options => $haproxy_member_options,
}
}
@@ -820,7 +825,7 @@ class tripleo::loadbalancer (
ports => '8776',
ipaddresses => hiera('cinder_api_node_ips', $controller_hosts_real),
server_names => $controller_hosts_names_real,
- options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ options => $haproxy_member_options,
}
}
@@ -834,7 +839,7 @@ class tripleo::loadbalancer (
ports => '8786',
ipaddresses => hiera('manila_api_node_ips', $controller_hosts_real),
server_names => $controller_hosts_names_real,
- options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ options => $haproxy_member_options,
}
}
@@ -848,7 +853,7 @@ class tripleo::loadbalancer (
ports => '8386',
ipaddresses => hiera('sahara_api_node_ips', $controller_hosts_real),
server_names => $controller_hosts_names_real,
- options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ options => $haproxy_member_options,
}
}
@@ -862,7 +867,7 @@ class tripleo::loadbalancer (
ports => '8779',
ipaddresses => hiera('trove_api_node_ips', $controller_hosts_real),
server_names => $controller_hosts_names_real,
- options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ options => $haproxy_member_options,
}
}
@@ -876,7 +881,7 @@ class tripleo::loadbalancer (
ports => '9292',
ipaddresses => hiera('glance_api_node_ips', $controller_hosts_real),
server_names => $controller_hosts_names_real,
- options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ options => $haproxy_member_options,
}
}
@@ -891,7 +896,7 @@ class tripleo::loadbalancer (
ports => '9191',
ipaddresses => hiera('glance_registry_node_ips', $controller_hosts_real),
server_names => $controller_hosts_names_real,
- options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ options => $haproxy_member_options,
}
}
@@ -905,7 +910,7 @@ class tripleo::loadbalancer (
ports => '8773',
ipaddresses => hiera('nova_api_node_ips', $controller_hosts_real),
server_names => $controller_hosts_names_real,
- options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ options => $haproxy_member_options,
}
}
@@ -923,7 +928,7 @@ class tripleo::loadbalancer (
ports => '8774',
ipaddresses => hiera('nova_api_node_ips', $controller_hosts_real),
server_names => $controller_hosts_names_real,
- options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ options => $haproxy_member_options,
}
}
@@ -938,7 +943,7 @@ class tripleo::loadbalancer (
ports => '8775',
ipaddresses => hiera('nova_metadata_node_ips', $controller_hosts_real),
server_names => $controller_hosts_names_real,
- options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ options => $haproxy_member_options,
}
}
@@ -956,7 +961,7 @@ class tripleo::loadbalancer (
ports => '6080',
ipaddresses => hiera('nova_api_node_ips', $controller_hosts_real),
server_names => $controller_hosts_names_real,
- options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ options => $haproxy_member_options,
}
}
@@ -970,7 +975,7 @@ class tripleo::loadbalancer (
ports => '8777',
ipaddresses => hiera('ceilometer_api_node_ips', $controller_hosts_real),
server_names => $controller_hosts_names_real,
- options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ options => $haproxy_member_options,
}
}
@@ -984,7 +989,7 @@ class tripleo::loadbalancer (
ports => '8042',
ipaddresses => hiera('aodh_api_node_ips', $controller_hosts_real),
server_names => $controller_hosts_names_real,
- options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ options => $haproxy_member_options,
}
}
@@ -998,7 +1003,7 @@ class tripleo::loadbalancer (
ports => '8080',
ipaddresses => hiera('swift_proxy_node_ips', $controller_hosts_real),
server_names => $controller_hosts_names_real,
- options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ options => $haproxy_member_options,
}
}
@@ -1014,7 +1019,7 @@ class tripleo::loadbalancer (
ports => '8004',
ipaddresses => hiera('heat_api_node_ips', $controller_hosts_real),
server_names => $controller_hosts_names_real,
- options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ options => $haproxy_member_options,
}
}
@@ -1028,7 +1033,7 @@ class tripleo::loadbalancer (
ports => '8003',
ipaddresses => hiera('heat_api_node_ips', $controller_hosts_real),
server_names => $controller_hosts_names_real,
- options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ options => $haproxy_member_options,
}
}
@@ -1042,7 +1047,7 @@ class tripleo::loadbalancer (
ports => '8000',
ipaddresses => hiera('heat_api_node_ips', $controller_hosts_real),
server_names => $controller_hosts_names_real,
- options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ options => $haproxy_member_options,
}
}
@@ -1060,7 +1065,7 @@ class tripleo::loadbalancer (
ports => '80',
ipaddresses => hiera('horizon_node_ips', $controller_hosts_real),
server_names => $controller_hosts_names_real,
- options => ["cookie ${::hostname}", 'check', 'inter 2000', 'rise 2', 'fall 5'],
+ options => union($haproxy_member_options, ["cookie ${::hostname}"]),
}
}
@@ -1072,13 +1077,13 @@ class tripleo::loadbalancer (
'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']
+ $mysql_member_options = union($haproxy_member_options, ['backup', 'port 9200', 'on-marked-down shutdown-sessions'])
} else {
$mysql_listen_options = {
'timeout client' => '90m',
'timeout server' => '90m',
}
- $mysql_member_options = ['check', 'inter 2000', 'rise 2', 'fall 5', 'backup']
+ $mysql_member_options = union($haproxy_member_options, ['backup'])
}
if $ironic {
@@ -1091,7 +1096,7 @@ class tripleo::loadbalancer (
ports => '6385',
ipaddresses => hiera('ironic_api_node_ips', $controller_hosts_real),
server_names => $controller_hosts_names_real,
- options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ options => $haproxy_member_options,
}
}
@@ -1126,7 +1131,7 @@ class tripleo::loadbalancer (
ports => '5672',
ipaddresses => hiera('rabbitmq_network', $controller_hosts_real),
server_names => $controller_hosts_names_real,
- options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ options => $haproxy_member_options,
}
}
@@ -1147,7 +1152,7 @@ class tripleo::loadbalancer (
ports => '6379',
ipaddresses => hiera('redis_node_ips', $controller_hosts_real),
server_names => $controller_hosts_names_real,
- options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ options => $haproxy_member_options,
}
}
@@ -1167,7 +1172,7 @@ class tripleo::loadbalancer (
ports => '8081',
ipaddresses => hiera('midonet_api_node_ips', $controller_hosts_real),
server_names => $controller_hosts_names_real,
- options => ['check', 'inter 2000', 'rise 2', 'fall 5'],
+ options => $haproxy_member_options,
}
}
}