neutron/neutron/services/trunk
Miguel Lavalle 33de608f04 Avoid race condition when deleting trunk bridges
Prior to this change, trunk bridges are created by os-vif but deleted
by Neutron when the last vif is removed from it. This creates race
conditions in some use cases, like DPDK with vhostuserclient mode, when
VMs are rebooted. To avoid these races, Neutron will not delete trunk
bridges anymore. Their creation and deletion will be os-vif's
responsiblity. Since [1], Nova uses the os-vif version that contains
this functionality.

This patch also changes the trunk status change event. During a live
migration, when the trunk parent port has been bound to the destination
host (that means there is only one port binding associated) and the
status has changed to ACTIVE, the method triggers the subport binding
to the new host too. This is because there could be a race condition
between the subport binding, triggered by the OVS agent, and the parent
port binding, triggered by Nova. If when the OVS agent tries to bind the
subports, the parent port is still bound to the source host, the subport
binding remains in the source host too, instead of changing to the
destination.

This patch also reverts [2] and [3]. As commented in the previous
paragraph, this patch fixes the issue reported in LP#1997025. The trunk
port live migration with ML2/OVS must be fixed with this patch.

[1]https://review.opendev.org/c/openstack/nova/+/865031
[2]https://review.opendev.org/c/openstack/neutron/+/865295
[3]https://review.opendev.org/c/openstack/neutron/+/865424

Closes-Bug: #1869244
Closes-Bug: #1997025

Change-Id: I4e16357f3ff214fcf41e418982806c24088a2665
2022-11-17 10:39:30 +01:00
..
drivers Avoid race condition when deleting trunk bridges 2022-11-17 10:39:30 +01:00
rpc Cleanup fanout queues on ovs agent stop (part 2) 2022-09-09 09:03:45 +02:00
seg_types use trunk constants from neutron-lib 2019-04-23 13:54:11 -06:00
__init__.py Revisit support for trunk segmentation types 2016-09-02 15:37:09 +00:00
exceptions.py Correctly label port as SubPort in SubPortNotFound 2021-06-28 17:19:41 +00:00
models.py Use neutron-lib standard_attr 2021-09-15 09:19:26 +00:00
plugin.py [Trunk] Update the trunk status with the parent status 2022-09-27 17:06:44 +02:00
rules.py Revert "Set system_scope='all' in elevated context" 2021-06-15 10:29:20 +02:00
utils.py Revert "Set system_scope='all' in elevated context" 2021-06-15 10:29:20 +02:00