File tree Expand file tree Collapse file tree 6 files changed +79
-3
lines changed Expand file tree Collapse file tree 6 files changed +79
-3
lines changed Original file line number Diff line number Diff line change @@ -90,4 +90,8 @@ haproxy_check_timeout: "10s"
90
90
# Check http://www.haproxy.org/download/1.5/doc/configuration.txt for available options
91
91
haproxy_defaults_balance : " roundrobin"
92
92
93
+ # Avoid TCP connections refusing to die after VIP switch
94
+ # https://bugs.launchpad.net/kolla-ansible/+bug/1917068
95
+ haproxy_host_ipv4_tcp_retries2 : " KOLLA_UNSET"
96
+
93
97
kolla_externally_managed_cert : False
Original file line number Diff line number Diff line change 10
10
sysctl_file : " {{ kolla_sysctl_conf_path }}"
11
11
become : true
12
12
with_items :
13
- - { name: "net.ipv4.ip_nonlocal_bind", value: 1}
14
- - { name: "net.ipv6.ip_nonlocal_bind", value: 1}
15
- - { name: "net.unix.max_dgram_qlen", value: 128}
13
+ - { name: "net.ipv4.ip_nonlocal_bind", value: 1 }
14
+ - { name: "net.ipv6.ip_nonlocal_bind", value: 1 }
15
+ - { name: "net.ipv4.tcp_retries2", value: "{{ haproxy_host_ipv4_tcp_retries2 }}" }
16
+ - { name: "net.unix.max_dgram_qlen", value: 128 }
16
17
when :
17
18
- set_sysctl | bool
18
19
- item.value != 'KOLLA_SKIP'
Original file line number Diff line number Diff line change
1
+ .. _haproxy-guide :
2
+
3
+ =============
4
+ HAProxy Guide
5
+ =============
6
+
7
+ Kolla Ansible supports a Highly Available (HA) deployment of
8
+ Openstack and other services. High-availability in Kolla
9
+ is implented as via Keepalived and HAProxy. Keepalived manages virtual IP
10
+ addresses, while HAProxy load-balances traffic to service backends.
11
+ These two components must be installed on the same hosts
12
+ and they are deployed to hosts in the ``haproxy `` group.
13
+
14
+ Preparation and deployment
15
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
16
+
17
+ HAProxy and Keepalived are enabled by default. They may be disabled by
18
+ setting the following in ``/etc/kolla/globals.yml ``:
19
+
20
+ .. code-block :: yaml
21
+
22
+ enable_haproxy : " no"
23
+ enable_keepalived : " no"
24
+
25
+ Configuration
26
+ ~~~~~~~~~~~~~
27
+
28
+ Failover tuning
29
+ ---------------
30
+
31
+ When a VIP fails over from one host to another, hosts may take some
32
+ time to detect that the connection has been dropped. This can lead
33
+ to service downtime.
34
+
35
+ To reduce the time by the kernel to close dead connections to VIP
36
+ address, modify the ``net.ipv4.tcp_retries2 `` kernel option by setting
37
+ the following in ``/etc/kolla/globals.yml ``:
38
+
39
+ .. code-block :: yaml
40
+
41
+ haproxy_host_ipv4_tcp_retries2 : 6
42
+
43
+ This is especially helpful for connections to MariaDB. See
44
+ `here <https://pracucci.com/linux-tcp-rto-min-max-and-tcp-retries2.html >`__,
45
+ `here <https://blog.cloudflare.com/when-tcp-sockets-refuse-to-die/ >`__ and
46
+ `here <https://access.redhat.com/solutions/726753 >`__ for
47
+ further information about this kernel option.
Original file line number Diff line number Diff line change
1
+ =================
2
+ High-availability
3
+ =================
4
+
5
+ This section describes high-availability configuration of services.
6
+
7
+ .. toctree ::
8
+ :maxdepth: 1
9
+
10
+ haproxy-guide
Original file line number Diff line number Diff line change @@ -17,3 +17,4 @@ Projects Deployment Configuration Reference
17
17
message-queues/index
18
18
deployment-config/index
19
19
deployment-and-bootstrapping/index
20
+ high-availability/index
Original file line number Diff line number Diff line change
1
+ ---
2
+ features :
3
+ - |
4
+ Added a new haproxy configuration variable,
5
+ ``haproxy_host_ipv4_tcp_retries2``,
6
+ which allows users to modify this kernel option.
7
+ This option sets maximum number of times a TCP packet is retransmitted
8
+ in established state before giving up. The default kernel value is 15,
9
+ which corresponds to a duration of approximately between 13 to 30
10
+ minutes, depending on the retransmission timeout. This variable can be used
11
+ to mitigate an issue with stuck connections in case of VIP failover,
12
+ see `bug 1917068 <https://bugs.launchpad.net/kolla-ansible/+bug/1917068>`__
13
+ for details.
You can’t perform that action at this time.
0 commit comments