From 3eebb0b00b06dd8f57d8f17d5b822d7346b6d2f2 Mon Sep 17 00:00:00 2001 From: Michele Baldessari Date: Tue, 19 Dec 2017 17:27:49 +0100 Subject: [PATCH] Use on-marked-down shutdown-sessions for redis haproxy conf The problem we have with redis can be described as follows: - Connection is made to redis via haproxy, where haproxy directs to one redis node - That chosen redis node fails and a new redis node gets promoted - HAProxy will send *new* connections to redis to the newly promoted redis server, but you still have a session active (ie. that has not hit timeout), so haproxy will attempt to use that connection. By using 'on-marked-down shutdown-sessions' we make sure we close old existing sessions when the redis master node changes. NB: Cherry-pick not 100% clean due to some context differences Closes-Bug: #1742086 Tested-By: Marian Krcmarik Change-Id: Ia4d8c27057ee2de9e49e4358aa069571d1c952a9 (cherry picked from commit dbfc8e1c1d5f39c7e64de7d7188cb2325492ee2a) --- manifests/haproxy.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/haproxy.pp b/manifests/haproxy.pp index f16444834..569c992a9 100644 --- a/manifests/haproxy.pp +++ b/manifests/haproxy.pp @@ -1433,7 +1433,7 @@ class tripleo::haproxy ( ports => '6379', ipaddresses => hiera('redis_node_ips', $controller_hosts_real), server_names => hiera('redis_node_names', $controller_hosts_names_real), - options => union($haproxy_member_options, $redis_ssl_member_options), + options => union($haproxy_member_options, $redis_ssl_member_options, ['on-marked-down shutdown-sessions']), verifyhost => false, } if $manage_firewall {