fix keepalived使用单播发送vrrp报文,以兼容公有云上自建LB

pull/258/head
gjmzj 2018-07-13 11:24:34 +08:00
parent 494c810df6
commit 6afcd95814
2 changed files with 10 additions and 0 deletions

View File

@ -5,6 +5,11 @@ global_defs {
vrrp_instance VI-kube-master {
state BACKUP
priority 110
unicast_src_ip {{ inventory_hostname }}
unicast_peer {
{% for h in groups['lb'] %}{% if h != inventory_hostname %}{{ h }}{% endif %}{% endfor %}
}
dont_track_primary
interface {{ LB_IF }}
virtual_router_id {{ ROUTER_ID }}

View File

@ -11,6 +11,11 @@ vrrp_script check-haproxy {
vrrp_instance VI-kube-master {
state MASTER
priority 120
unicast_src_ip {{ inventory_hostname }}
unicast_peer {
{% for h in groups['lb'] %}{% if h != inventory_hostname %}{{ h }}{% endif %}{% endfor %}
}
dont_track_primary
interface {{ LB_IF }}
virtual_router_id {{ ROUTER_ID }}