aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Cesario <carloscesario@gmail.com>2016-03-31 15:32:00 -0300
committerCarlos Cesario <carloscesario@gmail.com>2016-04-01 17:35:35 -0300
commit676998a1241f68b77d15b09d7113ae2182130c68 (patch)
treeb45435d989181a8ff93070ebd920a7a284fa91b6
parent19d325093d9d471eb9ba53d6516465ccd3f4d64f (diff)
downloadkolla-676998a1241f68b77d15b09d7113ae2182130c68.tar.gz
kolla-676998a1241f68b77d15b09d7113ae2182130c68.zip
Make keepalived virtual_router_id param configurable
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
-rw-r--r--ansible/group_vars/all.yml7
-rw-r--r--ansible/roles/haproxy/templates/keepalived.conf.j24
-rw-r--r--etc/kolla/globals.yml7
3 files changed, 16 insertions, 2 deletions
diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml
index a0ab95a8a..da2205648 100644
--- a/ansible/group_vars/all.yml
+++ b/ansible/group_vars/all.yml
@@ -68,6 +68,13 @@ docker_common_options:
####################
+# keepalived options
+####################
+# Arbitary unique number from 0..255
+keepalived_virtual_router_id: "51"
+
+
+####################
# Networking options
####################
kolla_external_vip_interface: "{{ network_interface }}"
diff --git a/ansible/roles/haproxy/templates/keepalived.conf.j2 b/ansible/roles/haproxy/templates/keepalived.conf.j2
index b6abb82e2..8307a2f50 100644
--- a/ansible/roles/haproxy/templates/keepalived.conf.j2
+++ b/ansible/roles/haproxy/templates/keepalived.conf.j2
@@ -5,11 +5,11 @@ vrrp_script check_alive {
rise 10
}
-vrrp_instance kolla_internal_vip {
+vrrp_instance kolla_internal_vip_{{ keepalived_virtual_router_id }} {
state BACKUP
nopreempt
interface {{ api_interface }}
- virtual_router_id 51
+ virtual_router_id {{ keepalived_virtual_router_id }}
priority {{ groups['haproxy'].index(inventory_hostname) + 1 }}
advert_int 1
virtual_ipaddress {
diff --git a/etc/kolla/globals.yml b/etc/kolla/globals.yml
index 6ef24ffa4..0ca120a47 100644
--- a/etc/kolla/globals.yml
+++ b/etc/kolla/globals.yml
@@ -75,6 +75,13 @@ neutron_external_interface: "eth1"
####################
+# keepalived options
+####################
+# Arbitary unique number from 0..255
+#keepalived_virtual_router_id: "51"
+
+
+####################
# TLS options
####################
# To provide encryption and authentication on the kolla_external_vip_interface,