Add an additional check for data interface configuration

If an interface is data interface and the vswitch type is not
accelerated, the data interface is a member of a linux bridge
and then the linux bridge will occupy the interface after host
unlock. if so, it will cause conflict with ovs bridge when ovs
agent add the interface to ovs bridge.
this patch add an additional check to determine if the vswitch
type supports accelerated interfaces. If it doesn`t support
accelerated interfaces, a bridge should not be created.

Change-Id: I0fbae866c364fe7b787aa850db79bca1bf597389
Closes-bug: #1834556
Signed-off-by: marvin <weifei.yu@intel.com>
This commit is contained in:
marvin 2019-08-12 02:26:15 +00:00 committed by marvin Yu
parent c2f8ada350
commit 8a4fd5dc79
1 changed files with 2 additions and 1 deletions

View File

@ -697,7 +697,8 @@ def get_bridge_interface_name(context, iface):
bridge = None
if (iface['iftype'] == constants.INTERFACE_TYPE_ETHERNET and
is_data_interface(context, iface) and
not is_dpdk_compatible(context, iface)):
not is_dpdk_compatible(context, iface) and
not is_vswitch_type_unaccelerated(context)):
bridge = 'br-' + get_interface_os_ifname(context, iface)
iface['_bridge'] = bridge # cache the result
return iface['_bridge']