diff options
author | 2015-06-25 16:06:08 +0000 | |
---|---|---|
committer | 2015-06-25 16:06:08 +0000 | |
commit | 11fc3f735170d63b6d8cef7fd78ec73651f4a6da (patch) | |
tree | 5fd25fae6c101344ccf06b85173bdb498095c4a7 /manifests | |
parent | 1d0d69d59dad889f57d9faf19414f8fb1514f9fb (diff) | |
parent | ce548df370f06b0a74fe1f13f3e1b9af3818c6b2 (diff) |
Merge "Introduce param to enable use of clustercheck"
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/loadbalancer.pp | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/manifests/loadbalancer.pp b/manifests/loadbalancer.pp index 102deeb..3efbb51 100644 --- a/manifests/loadbalancer.pp +++ b/manifests/loadbalancer.pp @@ -200,6 +200,10 @@ # (optional) Enable or not MySQL Galera binding # Defaults to false # +# [*mysql_clustercheck*] +# (optional) Enable check via clustercheck for mysql +# Defaults to false +# # [*rabbitmq*] # (optional) Enable or not RabbitMQ binding # Defaults to false @@ -249,6 +253,7 @@ class tripleo::loadbalancer ( $heat_cfn = false, $horizon = false, $mysql = false, + $mysql_clustercheck = false, $rabbitmq = false, $redis = false, ) { @@ -855,13 +860,25 @@ class tripleo::loadbalancer ( } } + if $mysql_clustercheck { + $mysql_listen_options = { + 'option' => [ 'httpchk' ], + 'timeout' => [ 'client 0', 'server 0' ], + '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' ], + } + $mysql_member_options = ['check', 'inter 2000', 'rise 2', 'fall 5', 'backup'] + } if $mysql { haproxy::listen { 'mysql': ipaddress => [hiera('mysql_vip', $controller_virtual_ip)], ports => 3306, - options => { - 'timeout' => [ 'client 0', 'server 0' ], - }, + options => $mysql_listen_options, collect_exported => false, } haproxy::balancermember { 'mysql-backup': @@ -869,7 +886,7 @@ class tripleo::loadbalancer ( ports => '3306', ipaddresses => hiera('mysql_node_ips', $controller_hosts_real), server_names => $controller_hosts_names_real, - options => ['check', 'inter 2000', 'rise 2', 'fall 5', 'backup'], + options => $mysql_member_options, } } |