Merge "Fix IPv6 session persistence failed" into stable/2023.1

This commit is contained in:
Zuul 2024-05-28 17:06:47 +00:00 committed by Gerrit Code Review
commit a638ed7365
3 changed files with 9 additions and 3 deletions

View File

@ -329,10 +329,10 @@ backend {{ pool.id }}:{{ listener.id }}
{% if (pool.session_persistence.type ==
constants.SESSION_PERSISTENCE_SOURCE_IP) %}
{% if loadbalancer.topology == constants.TOPOLOGY_ACTIVE_STANDBY %}
stick-table type ip size {{ pool.stick_size }} peers {{
stick-table type ipv6 size {{ pool.stick_size }} peers {{
"%s_peers"|format(loadbalancer.id.replace("-", ""))|trim() }}
{% else %}
stick-table type ip size {{ pool.stick_size }}
stick-table type ipv6 size {{ pool.stick_size }}
{% endif %}
stick on src
{% elif (pool.session_persistence.type ==

View File

@ -921,7 +921,7 @@ class TestHaproxyCfg(base.TestCase):
be = ("backend sample_pool_id_1:sample_listener_id_1\n"
" mode http\n"
" balance roundrobin\n"
" stick-table type ip size 10k\n"
" stick-table type ipv6 size 10k\n"
" stick on src\n"
" timeout check 31s\n"
" option httpchk GET /index.html HTTP/1.0\\r\\n\n"

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Fixed the issue with session persistence based on source IP not working for
IPv6 load balancers. Session persistence now functions properly for IPv4,
IPv6 and dual-stack load balancers.