aboutsummaryrefslogtreecommitdiffstats
path: root/manifests
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-11-08 16:12:46 +0000
committerGerrit Code Review <review@openstack.org>2016-11-08 16:12:46 +0000
commit4d6b55c699baced5a64476be1a4ca9dba11f8a6b (patch)
tree22640a9a263c4bf726b3186548856d294616b965 /manifests
parent1bee7bc8fa0ca5ace330e54bc3e64d7f6692d5a7 (diff)
parent943e49435621062a1c898de4b2edccf48c59fc16 (diff)
Merge "Improve failed mysql node removal time in HA deploys."
Diffstat (limited to 'manifests')
-rw-r--r--manifests/haproxy.pp23
1 files changed, 20 insertions, 3 deletions
diff --git a/manifests/haproxy.pp b/manifests/haproxy.pp
index 8b6b110..99c9205 100644
--- a/manifests/haproxy.pp
+++ b/manifests/haproxy.pp
@@ -230,6 +230,14 @@
# (optional) Enable check via clustercheck for mysql
# Defaults to false
#
+# [*mysql_member_options*]
+# The options to use for the mysql HAProxy balancer members.
+# If this parameter is undefined, the actual value configured will depend
+# on the value of $mysql_clustercheck. If cluster checking is enabled,
+# the mysql member options will be: "['backup', 'port 9200', 'on-marked-down shutdown-sessions', 'check', 'inter 1s']"
+# and if mysql cluster checking is disabled, the member options will be: "union($haproxy_member_options, ['backup'])"
+# Defaults to undef
+#
# [*rabbitmq*]
# (optional) Enable or not RabbitMQ binding
# Defaults to false
@@ -486,6 +494,7 @@ class tripleo::haproxy (
$ironic_inspector = hiera('ironic_inspector_enabled', false),
$mysql = hiera('mysql_enabled', false),
$mysql_clustercheck = false,
+ $mysql_member_options = undef,
$rabbitmq = false,
$docker_registry = hiera('enable_docker_registry', false),
$redis = hiera('redis_enabled', false),
@@ -1094,13 +1103,21 @@ class tripleo::haproxy (
'stick-table' => 'type ip size 1000',
'stick' => 'on dst',
}
- $mysql_member_options = union($haproxy_member_options, ['backup', 'port 9200', 'on-marked-down shutdown-sessions'])
+ if $mysql_member_options {
+ $mysql_member_options_real = $mysql_member_options
+ } else {
+ $mysql_member_options_real = ['backup', 'port 9200', 'on-marked-down shutdown-sessions', 'check', 'inter 1s']
+ }
} else {
$mysql_listen_options = {
'timeout client' => '90m',
'timeout server' => '90m',
}
- $mysql_member_options = union($haproxy_member_options, ['backup'])
+ if $mysql_member_options {
+ $mysql_member_options_real = $mysql_member_options
+ } else {
+ $mysql_member_options_real = union($haproxy_member_options, ['backup'])
+ }
}
if $mysql {
@@ -1114,7 +1131,7 @@ class tripleo::haproxy (
ports => '3306',
ipaddresses => hiera('mysql_node_ips', $controller_hosts_real),
server_names => hiera('mysql_node_names', $controller_hosts_names_real),
- options => $mysql_member_options,
+ options => $mysql_member_options_real,
}
}