Add DVR support to DevStack
This patch introduces a new Neutron config option: Q_DVR_MODE.
The possible values are:
- legacy : No DVR functionality
- dvr_snat: Controller/single node DVR
- dvr : Compute node in multi-node DVR
When DVR is enabled the following configuration changes will be
in place:
- neutron.conf
- router_distributed=True
- l3_agent.ini
- agent_mode=$Q_DVR_MODE
- ovs_neutron_plugin.ini:
- enable_distributed_routing=True
- l2_population=True
- tunnel_types=vxlan
Supports-blueprint: neutron-ovs-dvr
Change-Id: I669e054a8489fe7ac7f5c00df6535349d477e8c4
diff --git a/lib/neutron_plugins/ml2 b/lib/neutron_plugins/ml2
index 8e131bb..4cf484e 100644
--- a/lib/neutron_plugins/ml2
+++ b/lib/neutron_plugins/ml2
@@ -112,6 +112,12 @@
populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2_type_vxlan $Q_ML2_PLUGIN_VXLAN_TYPE_OPTIONS
populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2_type_vlan $Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS
+
+ if [[ "$Q_DVR_MODE" != "legacy" ]]; then
+ populate_ml2_config /$Q_PLUGIN_CONF_FILE agent l2_population=True
+ populate_ml2_config /$Q_PLUGIN_CONF_FILE agent tunnel_types=vxlan
+ populate_ml2_config /$Q_PLUGIN_CONF_FILE agent enable_distributed_routing=True
+ fi
}
function has_neutron_plugin_security_group {