Merge "Set datapath to $OVS_DATAPATH_TYPE for bridges"

This commit is contained in:
Jenkins 2015-06-16 19:44:32 +00:00 committed by Gerrit Code Review
commit ba9f43e3cc
2 changed files with 15 additions and 7 deletions

View File

@ -59,7 +59,7 @@ function neutron_plugin_configure_plugin_agent {
OVS_BRIDGE_MAPPINGS=$PHYSICAL_NETWORK:$OVS_PHYSICAL_BRIDGE
# Configure bridge manually with physical interface as port for multi-node
sudo ovs-vsctl --no-wait -- --may-exist add-br $OVS_PHYSICAL_BRIDGE
_neutron_ovs_base_add_bridge $OVS_PHYSICAL_BRIDGE
fi
if [[ "$OVS_BRIDGE_MAPPINGS" != "" ]]; then
iniset /$Q_PLUGIN_CONF_FILE ovs bridge_mappings $OVS_BRIDGE_MAPPINGS
@ -92,7 +92,7 @@ function neutron_plugin_configure_plugin_agent {
# Set up domU's L2 agent:
# Create a bridge "br-$GUEST_INTERFACE_DEFAULT"
sudo ovs-vsctl --no-wait -- --may-exist add-br "br-$GUEST_INTERFACE_DEFAULT"
_neutron_ovs_base_add_bridge "br-$GUEST_INTERFACE_DEFAULT"
# Add $GUEST_INTERFACE_DEFAULT to that bridge
sudo ovs-vsctl add-port "br-$GUEST_INTERFACE_DEFAULT" $GUEST_INTERFACE_DEFAULT

View File

@ -15,13 +15,21 @@ function is_neutron_ovs_base_plugin {
return 0
}
function _neutron_ovs_base_add_bridge {
local bridge=$1
local addbr_cmd="sudo ovs-vsctl --no-wait -- --may-exist add-br $bridge"
if [ "$OVS_DATAPATH_TYPE" != "" ] ; then
addbr_cmd="$addbr_cmd -- set Bridge $bridge datapath_type=${OVS_DATAPATH_TYPE}"
fi
$addbr_cmd
}
function _neutron_ovs_base_setup_bridge {
local bridge=$1
neutron-ovs-cleanup
sudo ovs-vsctl --no-wait -- --may-exist add-br $bridge
if [[ $OVS_DATAPATH_TYPE != "" ]]; then
sudo ovs-vsctl set Bridge $bridge datapath_type=${OVS_DATAPATH_TYPE}
fi
_neutron_ovs_base_add_bridge $bridge
sudo ovs-vsctl --no-wait br-set-external-id $bridge bridge-id $bridge
}
@ -92,7 +100,7 @@ function _neutron_ovs_base_configure_l3_agent {
sudo ip link set $Q_PUBLIC_VETH_EX up
sudo ip addr flush dev $Q_PUBLIC_VETH_EX
else
sudo ovs-vsctl -- --may-exist add-br $PUBLIC_BRIDGE
_neutron_ovs_base_add_bridge $PUBLIC_BRIDGE
sudo ovs-vsctl br-set-external-id $PUBLIC_BRIDGE bridge-id $PUBLIC_BRIDGE
fi
}