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 <mkrcmari@redhat.com> Change-Id: Ia4d8c27057ee2de9e49e4358aa069571d1c952a9 (cherry picked from commitdbfc8e1c1d
) (cherry picked from commit3eebb0b00b
) (cherry picked from commit507fd3a69f
)
This commit is contained in:
parent
f8ff0d0b30
commit
db2d6f7198
|
@ -970,7 +970,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']),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue