diff options
| author | Dave McCowan <dmccowan@cisco.com> | 2016-03-30 21:26:19 -0400 |
|---|---|---|
| committer | Dave McCowan <dmccowan@cisco.com> | 2016-04-01 12:04:22 -0400 |
| commit | bbbe84667d49cebaa8b40366f9e3be79a47e2606 (patch) | |
| tree | 285ed47c6a76de6cc0490cce68c0c3951a5f9cfe /ansible/roles/haproxy | |
| parent | dff16f922186e5bd06509355cdc663c37451a550 (diff) | |
| download | kolla-bbbe84667d49cebaa8b40366f9e3be79a47e2606.tar.gz kolla-bbbe84667d49cebaa8b40366f9e3be79a47e2606.zip | |
When two interfaces are used for two VIPs, tie them together
When a node uses two physical interfaces for its two VIPs, these
physical interfaces should be tied together, so both VIPs will
be taken out of scheduling if either one fails. Without this change,
if a request comes into one interface that needs access to the
second interface to process the request, the original request
unnecessarily fails. Repeating this results in a black hole where
a failing server keeps getting new requests.
Change-Id: Ic51e6584c1fbda3eb7821cb47f759c77e562cc65
Closes-Bug: #1550455
Diffstat (limited to 'ansible/roles/haproxy')
| -rw-r--r-- | ansible/roles/haproxy/templates/keepalived.conf.j2 | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/ansible/roles/haproxy/templates/keepalived.conf.j2 b/ansible/roles/haproxy/templates/keepalived.conf.j2 index e0467fa78..b6abb82e2 100644 --- a/ansible/roles/haproxy/templates/keepalived.conf.j2 +++ b/ansible/roles/haproxy/templates/keepalived.conf.j2 @@ -13,28 +13,16 @@ vrrp_instance kolla_internal_vip { priority {{ groups['haproxy'].index(inventory_hostname) + 1 }} advert_int 1 virtual_ipaddress { - {{ kolla_internal_vip_address }} - } - authentication { - auth_type PASS - auth_pass {{ keepalived_password }} - } - track_script { - check_alive - } -} - + {{ kolla_internal_vip_address }} dev {{ api_interface }} {% if haproxy_enable_external_vip | bool %} -vrrp_instance kolla_external_vip { - state BACKUP - nopreempt - interface {{ kolla_external_vip_interface }} - virtual_router_id 52 - priority {{ groups['haproxy'].index(inventory_hostname) + 1 }} - advert_int 1 - virtual_ipaddress { - {{ kolla_external_vip_address }} + {{ kolla_external_vip_address }} dev {{ kolla_external_vip_interface }} +{% endif %} + } +{% if haproxy_enable_external_vip | bool and api_interface != kolla_external_vip_interface %} + track_interface { + {{ kolla_external_vip_interface }} } +{% endif %} authentication { auth_type PASS auth_pass {{ keepalived_password }} @@ -43,4 +31,3 @@ vrrp_instance kolla_external_vip { check_alive } } -{% endif %} |
