diff options
-rw-r--r-- | lib/facter/netmask_ipv6.rb | 2 | ||||
-rw-r--r-- | manifests/loadbalancer.pp | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/facter/netmask_ipv6.rb b/lib/facter/netmask_ipv6.rb index 5261485..598641f 100644 --- a/lib/facter/netmask_ipv6.rb +++ b/lib/facter/netmask_ipv6.rb @@ -8,6 +8,8 @@ def netmask6(value) end if Facter.value('facterversion')[0].to_i < 3 + Facter::Util::IP::REGEX_MAP[:linux][:ipaddress6] = + /inet6 (?:addr: )?((?!(?:fe80|::1))(?>[0-9,a-f,A-F]*\:{1,2})+[0-9,a-f,A-F]{0,4})/ Facter::Util::IP.get_interfaces.each do |interface| Facter.add('netmask6_' + Facter::Util::IP.alphafy(interface)) do setcode do diff --git a/manifests/loadbalancer.pp b/manifests/loadbalancer.pp index 0d70f32..d61eea6 100644 --- a/manifests/loadbalancer.pp +++ b/manifests/loadbalancer.pp @@ -303,6 +303,11 @@ # (optional) Enable or not Redis binding # Defaults to false # +# [*redis_password*] +# (optional) Password for Redis authentication, eventually needed by the +# specific monitoring we do from HAProxy for Redis +# Defaults to undef +# # [*midonet_api*] # (optional) Enable or not MidoNet API binding # Defaults to false @@ -408,6 +413,7 @@ class tripleo::loadbalancer ( $mysql_clustercheck = false, $rabbitmq = false, $redis = false, + $redis_password = undef, $midonet_api = false, $service_ports = {} ) { @@ -1344,12 +1350,17 @@ class tripleo::loadbalancer ( } if $redis { + if $redis_password { + $redis_tcp_check_options = ["send AUTH\\ ${redis_password}\\r\\n"] + } else { + $redis_tcp_check_options = [] + } haproxy::listen { 'redis': bind => $redis_bind_opts, options => { 'balance' => 'first', 'option' => ['tcp-check',], - 'tcp-check' => ['send info\ replication\r\n','expect string role:master'], + 'tcp-check' => union($redis_tcp_check_options, ['send PING\r\n','expect string +PONG','send info\ replication\r\n','expect string role:master','send QUIT\r\n','expect string +OK']), }, collect_exported => false, } |