Add fallback prevention to mysql in haproxy config
Using sticky-table + stick on dst prevents fallback to active node in scenario where it comes back from being down. This may lead to sql connections from openstack services to different mysql nodes. This patch also removes hash-type and balance option as stickiness is being done with sticky-table. Change-Id: Ibc2fb4fa5a1938aec447694638c4c9e99edbba53 Closes-bug: #1529937
This commit is contained in:
parent
7319ad74bc
commit
fa8f1f7746
@ -50,12 +50,12 @@ class openstack::ha::mysqld (
|
||||
balancermember_port => 3307,
|
||||
define_backups => true,
|
||||
haproxy_config_options => {
|
||||
'hash-type' => 'consistent',
|
||||
'option' => ['httpchk', 'tcplog','clitcpka','srvtcpka'],
|
||||
'balance' => 'source',
|
||||
'mode' => 'tcp',
|
||||
'timeout server' => '28801s',
|
||||
'timeout client' => '28801s'
|
||||
'timeout client' => '28801s',
|
||||
'stick-table' => 'type ip size 1',
|
||||
'stick on' => 'dst'
|
||||
},
|
||||
balancermember_options => 'check port 49000 inter 20s fastinter 2s downinter 2s rise 3 fall 3',
|
||||
}
|
||||
|
@ -40,12 +40,12 @@ describe manifest do
|
||||
'balancermember_port' => 3307,
|
||||
'define_backups' => true,
|
||||
'haproxy_config_options' => {
|
||||
'hash-type' => 'consistent',
|
||||
'option' => ['httpchk', 'tcplog','clitcpka','srvtcpka'],
|
||||
'balance' => 'source',
|
||||
'mode' => 'tcp',
|
||||
'timeout server' => '28801s',
|
||||
'timeout client' => '28801s'
|
||||
'timeout client' => '28801s',
|
||||
'stick-table' => 'type ip size 1',
|
||||
'stick on' => 'dst'
|
||||
},
|
||||
'balancermember_options' =>
|
||||
'check port 49000 inter 20s fastinter 2s downinter 2s rise 3 fall 3',
|
||||
|
Loading…
Reference in New Issue
Block a user