Skip to content
Snippets Groups Projects
Commit bbcda9e0 authored by Zuul's avatar Zuul Committed by Gerrit Code Review
Browse files

Merge "keepalived: ability to use unicast instead of multicast"

parents bfb19acf 6832e0aa
No related branches found
No related tags found
No related merge requests found
......@@ -44,3 +44,6 @@ haproxy_glance_api_server_timeout: "6h"
syslog_server: "{{ api_interface_address }}"
syslog_haproxy_facility: "local1"
# Traffic mode. Valid options are [ multicast, unicast ]
keepalived_traffic_mode: "multicast"
......@@ -12,8 +12,21 @@ vrrp_instance kolla_internal_vip_{{ keepalived_virtual_router_id }} {
virtual_router_id {{ keepalived_virtual_router_id }}
priority {{ groups['haproxy'].index(inventory_hostname) + 1 }}
advert_int 1
{% if keepalived_traffic_mode == 'unicast' %}
unicast_src_ip {{ api_interface_address }}
{% if groups['haproxy'] | length > 1 %}
unicast_peer {
{% for host in groups['haproxy'] %}
{% set ip_addr = hostvars[host]['ansible_' + hostvars[host]['api_interface']]['ipv4']['address'] %}
{% if ip_addr != api_interface_address %}
{{ ip_addr }}
{% endif %}
{% endfor %}
}
{% endif %}
{% endif %}
virtual_ipaddress {
{{ kolla_internal_vip_address }} dev {{ api_interface }}
{{ kolla_internal_vip_address }} dev {{ api_interface }}
{% if haproxy_enable_external_vip | bool %}
{{ kolla_external_vip_address }} dev {{ kolla_external_vip_interface }}
{% endif %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment