From a124cdffdb97abe92deb163d3d64d09ded9cf0c0 Mon Sep 17 00:00:00 2001 From: Ann Kamyshnikova Date: Fri, 3 Feb 2017 17:20:52 +0400 Subject: [PATCH] Add option to create HA routers by default Add option in config to enable creation HA routers by default. Also set max_l3_agents_per_router to 0, so HA router will be scheduled on all L3 agents. This option is added unconditinally as HA routers can be created without enabling l3_ha by default. Change-Id: I88a2934cda6e958803dfee5334bdae265c0d7c6c --- service/files/defaults.yaml | 1 + service/files/neutron.conf.j2 | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/service/files/defaults.yaml b/service/files/defaults.yaml index e50a651..c692c2e 100644 --- a/service/files/defaults.yaml +++ b/service/files/defaults.yaml @@ -23,6 +23,7 @@ configs: vlan_range: false logging_debug: false plugin_agent: "openvswitch" + l3_ha: false ovsdb: interface: "native" connection: "unix:/run/openvswitch/db.sock" diff --git a/service/files/neutron.conf.j2 b/service/files/neutron.conf.j2 index 39492ee..bcea232 100644 --- a/service/files/neutron.conf.j2 +++ b/service/files/neutron.conf.j2 @@ -24,6 +24,14 @@ dhcp_agents_per_network = 2 core_plugin = {{ neutron.core_plugin }} service_plugins = router{% if neutron.enable_lbaas %},neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2{% endif %}{% if neutron.enable_qos %},qos{% endif %} + +# Enable HA mode for virtual routers. (boolean value) +l3_ha = {{ neutron.l3_ha }} + +# If it is set to 0 then the ha router will be scheduled on every L3 agent. +max_l3_agents_per_router=0 + + {% if neutron.enable_lbaas %} [service_providers] service_provider = LOADBALANCERV2:Haproxy:neutron_lbaas.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default