Set datapath to $OVS_DATAPATH_TYPE for bridges
This change extends devstack to configure the br-ex, br-<phy> and Xenserver's br-$GUEST_INTERFACE_DEFAULT datapaths when OVS_DATAPATH_TYPE is set. Change-Id: I71e590de86e7526e8423140463752d6b3ad14214 Closes-Bug: #1416444
This commit is contained in:
parent
168b7c226c
commit
d4c89289f9
@ -59,7 +59,7 @@ function neutron_plugin_configure_plugin_agent {
|
|||||||
OVS_BRIDGE_MAPPINGS=$PHYSICAL_NETWORK:$OVS_PHYSICAL_BRIDGE
|
OVS_BRIDGE_MAPPINGS=$PHYSICAL_NETWORK:$OVS_PHYSICAL_BRIDGE
|
||||||
|
|
||||||
# Configure bridge manually with physical interface as port for multi-node
|
# 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
|
fi
|
||||||
if [[ "$OVS_BRIDGE_MAPPINGS" != "" ]]; then
|
if [[ "$OVS_BRIDGE_MAPPINGS" != "" ]]; then
|
||||||
iniset /$Q_PLUGIN_CONF_FILE ovs bridge_mappings $OVS_BRIDGE_MAPPINGS
|
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:
|
# Set up domU's L2 agent:
|
||||||
|
|
||||||
# Create a bridge "br-$GUEST_INTERFACE_DEFAULT"
|
# 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
|
# Add $GUEST_INTERFACE_DEFAULT to that bridge
|
||||||
sudo ovs-vsctl add-port "br-$GUEST_INTERFACE_DEFAULT" $GUEST_INTERFACE_DEFAULT
|
sudo ovs-vsctl add-port "br-$GUEST_INTERFACE_DEFAULT" $GUEST_INTERFACE_DEFAULT
|
||||||
|
|
||||||
|
@ -16,13 +16,21 @@ function is_neutron_ovs_base_plugin {
|
|||||||
return 0
|
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 {
|
function _neutron_ovs_base_setup_bridge {
|
||||||
local bridge=$1
|
local bridge=$1
|
||||||
neutron-ovs-cleanup
|
neutron-ovs-cleanup
|
||||||
sudo ovs-vsctl --no-wait -- --may-exist add-br $bridge
|
_neutron_ovs_base_add_bridge $bridge
|
||||||
if [[ $OVS_DATAPATH_TYPE != "" ]]; then
|
|
||||||
sudo ovs-vsctl set Bridge $bridge datapath_type=${OVS_DATAPATH_TYPE}
|
|
||||||
fi
|
|
||||||
sudo ovs-vsctl --no-wait br-set-external-id $bridge bridge-id $bridge
|
sudo ovs-vsctl --no-wait br-set-external-id $bridge bridge-id $bridge
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,7 +101,7 @@ function _neutron_ovs_base_configure_l3_agent {
|
|||||||
sudo ip link set $Q_PUBLIC_VETH_EX up
|
sudo ip link set $Q_PUBLIC_VETH_EX up
|
||||||
sudo ip addr flush dev $Q_PUBLIC_VETH_EX
|
sudo ip addr flush dev $Q_PUBLIC_VETH_EX
|
||||||
else
|
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
|
sudo ovs-vsctl br-set-external-id $PUBLIC_BRIDGE bridge-id $PUBLIC_BRIDGE
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user