aboutsummaryrefslogtreecommitdiff
path: root/ansible
diff options
context:
space:
mode:
authorSamYaple <sam@yaple.net>2016-03-14 01:36:33 +0000
committerSamYaple <sam@yaple.net>2016-03-14 01:36:33 +0000
commit024d76534e5d69239a2a8290dab110bfa3c75306 (patch)
treee58911743d5955912a4c7f67c67e0db956bfc2dc /ansible
parente4829471651dd9677f2f73de4e2896902666fdd4 (diff)
downloadkolla-024d76534e5d69239a2a8290dab110bfa3c75306.tar.gz
kolla-024d76534e5d69239a2a8290dab110bfa3c75306.zip
Use nopreempt for keepalived
Without this option the vip will always bounce to the highest priority node that is up. So if you reboot the highest priority node the vip will fail to the second highest. When the highest priority node recovers it will claim the vip again leaving you will two fail overs rather than one. TrivialFix Change-Id: I4a3c6c10eee391cdbdd80c44a71a9fafd1069944
Diffstat (limited to 'ansible')
-rw-r--r--ansible/roles/haproxy/templates/keepalived.conf.j26
1 files changed, 4 insertions, 2 deletions
diff --git a/ansible/roles/haproxy/templates/keepalived.conf.j2 b/ansible/roles/haproxy/templates/keepalived.conf.j2
index d599ea721..e0467fa78 100644
--- a/ansible/roles/haproxy/templates/keepalived.conf.j2
+++ b/ansible/roles/haproxy/templates/keepalived.conf.j2
@@ -6,7 +6,8 @@ vrrp_script check_alive {
}
vrrp_instance kolla_internal_vip {
- state MASTER
+ state BACKUP
+ nopreempt
interface {{ api_interface }}
virtual_router_id 51
priority {{ groups['haproxy'].index(inventory_hostname) + 1 }}
@@ -25,7 +26,8 @@ vrrp_instance kolla_internal_vip {
{% if haproxy_enable_external_vip | bool %}
vrrp_instance kolla_external_vip {
- state MASTER
+ state BACKUP
+ nopreempt
interface {{ kolla_external_vip_interface }}
virtual_router_id 52
priority {{ groups['haproxy'].index(inventory_hostname) + 1 }}