676998a124
To be kolla deploy multiple clouds, we need to be able to configure virtual_router_id other wise haproxy will fail setup the VIP for the second cloud. Partially-Implements: blueprint multiple-cloud Closes-Bug: #1564547 Change-Id: I9eb27dd6fba61205841eadafc96601e235d2fe6d
34 lines
922 B
Django/Jinja
34 lines
922 B
Django/Jinja
vrrp_script check_alive {
|
|
script "/check_alive.sh"
|
|
interval 2
|
|
fall 2
|
|
rise 10
|
|
}
|
|
|
|
vrrp_instance kolla_internal_vip_{{ keepalived_virtual_router_id }} {
|
|
state BACKUP
|
|
nopreempt
|
|
interface {{ api_interface }}
|
|
virtual_router_id {{ keepalived_virtual_router_id }}
|
|
priority {{ groups['haproxy'].index(inventory_hostname) + 1 }}
|
|
advert_int 1
|
|
virtual_ipaddress {
|
|
{{ kolla_internal_vip_address }} dev {{ api_interface }}
|
|
{% if haproxy_enable_external_vip | bool %}
|
|
{{ 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 }}
|
|
}
|
|
track_script {
|
|
check_alive
|
|
}
|
|
}
|