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
This commit is contained in:
parent
faa46f0014
commit
eea7621d23
23
lib/neutron
23
lib/neutron
@ -143,6 +143,17 @@ else
|
|||||||
Q_RR_COMMAND="sudo $NEUTRON_ROOTWRAP $Q_RR_CONF_FILE"
|
Q_RR_COMMAND="sudo $NEUTRON_ROOTWRAP $Q_RR_CONF_FILE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Distributed Virtual Router (DVR) configuration
|
||||||
|
# Can be:
|
||||||
|
# legacy - No DVR functionality
|
||||||
|
# dvr_snat - Controller or single node DVR
|
||||||
|
# dvr - Compute node in multi-node DVR
|
||||||
|
Q_DVR_MODE=${Q_DVR_MODE:-legacy}
|
||||||
|
if [[ "$Q_DVR_MODE" != "legacy" ]]; then
|
||||||
|
Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch,linuxbridge,l2population
|
||||||
|
fi
|
||||||
|
|
||||||
# Provider Network Configurations
|
# Provider Network Configurations
|
||||||
# --------------------------------
|
# --------------------------------
|
||||||
|
|
||||||
@ -304,6 +315,10 @@ function configure_neutron {
|
|||||||
_configure_neutron_metadata_agent
|
_configure_neutron_metadata_agent
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$Q_DVR_MODE" != "legacy" ]]; then
|
||||||
|
_configure_dvr
|
||||||
|
fi
|
||||||
|
|
||||||
_configure_neutron_debug_command
|
_configure_neutron_debug_command
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -571,7 +586,7 @@ function cleanup_neutron {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# delete all namespaces created by neutron
|
# delete all namespaces created by neutron
|
||||||
for ns in $(sudo ip netns list | grep -o -E '(qdhcp|qrouter|qlbaas)-[0-9a-f-]*'); do
|
for ns in $(sudo ip netns list | grep -o -E '(qdhcp|qrouter|qlbaas|fip|snat)-[0-9a-f-]*'); do
|
||||||
sudo ip netns delete ${ns}
|
sudo ip netns delete ${ns}
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@ -749,6 +764,12 @@ function _configure_neutron_vpn {
|
|||||||
neutron_vpn_configure_common
|
neutron_vpn_configure_common
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _configure_dvr {
|
||||||
|
iniset $NEUTRON_CONF DEFAULT router_distributed True
|
||||||
|
iniset $Q_L3_CONF_FILE DEFAULT agent_mode $Q_DVR_MODE
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# _configure_neutron_plugin_agent() - Set config files for neutron plugin agent
|
# _configure_neutron_plugin_agent() - Set config files for neutron plugin agent
|
||||||
# It is called when q-agt is enabled.
|
# It is called when q-agt is enabled.
|
||||||
function _configure_neutron_plugin_agent {
|
function _configure_neutron_plugin_agent {
|
||||||
|
@ -112,6 +112,12 @@ function neutron_plugin_configure_service {
|
|||||||
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_vxlan $Q_ML2_PLUGIN_VXLAN_TYPE_OPTIONS
|
||||||
|
|
||||||
populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2_type_vlan $Q_ML2_PLUGIN_VLAN_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 {
|
function has_neutron_plugin_security_group {
|
||||||
|
Loading…
Reference in New Issue
Block a user