From dbfc8e1c1d5f39c7e64de7d7188cb2325492ee2a 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. Closes-Bug: #1742086 Tested-By: Marian Krcmarik Change-Id: Ia4d8c27057ee2de9e49e4358aa069571d1c952a9 --- manifests/haproxy.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/haproxy.pp b/manifests/haproxy.pp index 39182e3f8..5b22b56f2 100644 --- a/manifests/haproxy.pp +++ b/manifests/haproxy.pp @@ -1432,7 +1432,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 => $haproxy_member_options, + options => union($haproxy_member_options, ['on-marked-down shutdown-sessions']), } if $manage_firewall { include ::tripleo::firewall