neutron/neutron/services
Nate Johnston c0b15a8cbe Wait before deleting trunk bridges for DPDK vhu
DPDK vhostuser mode (DPDK/vhu) means that when an instance is powered
off the port is deleted, and when an instance is powered on a port is
created.  This means a reboot is functionally a super fast
delete-then-create.  Neutron trunking mode in combination with DPDK/vhu
implements a trunk bridge for each tenant, and the ports for the
instances are created as subports of that bridge.  The standard way a
trunk bridge works is that when all the subports are deleted, a thread
is spawned to delete the trunk bridge, because that is an expensive and
time-consuming operation.  That means that if the port in question is
the only port on the trunk on that compute node, this happens:

1. The port is deleted
2. A thread is spawned to delete the trunk
3. The port is recreated

If the trunk is deleted after #3 happens then the instance has no
networking and is inaccessible; this is the scenario that was dealt with
in a previous change [1].  But there continue to be issues with errors
"RowNotFound: Cannot find Bridge with name=tbr-XXXXXXXX-X".  What is
happening in this case is that the trunk is being deleted in the middle
of the execution of #3, so that it stops existing in the middle of the
port creation logic but before the port is actually recreated.

Since this is a timing issue between two different threads it's
difficult to stamp out entirely, but I think the best way to do it is to
add a slight delay in the trunk deletion thread, just a second or two.
That will give the port time to come back online and avoid the trunk
deletion entirely.

[1] https://review.opendev.org/623275

Related-Bug: #1869244
Change-Id: I36a98fe5da85da1f3a0315dd1a470f062de6f38b
(cherry picked from commit e37722c0f5)
2020-04-03 21:11:57 +00:00
..
auto_allocate Implement filter validation 2018-07-19 04:13:43 +00:00
externaldns Fix all pep8 E129 errors 2018-05-03 13:44:04 +09:00
flavors Implement filter validation 2018-07-19 04:13:43 +00:00
l3_router Merge "Implement filter validation" 2018-07-24 15:11:07 +00:00
logapi Merge "ovs fw: apply the NORMAL action on egress traffic in a single table" into stable/rocky 2018-09-07 18:40:00 +00:00
loki use sqla functions from neutron-lib 2018-07-25 21:04:20 +00:00
metering Retry creating iptables managers and adding metering rules 2019-11-04 21:40:22 +00:00
network_ip_availability Implement filter validation 2018-07-19 04:13:43 +00:00
portforwarding Prevent create port forwarding to port which has binding fip 2019-06-19 17:04:10 +02:00
qos Fix QoS rule update 2019-03-28 08:51:38 +00:00
rbac Neutron RBAC API and network support 2015-08-20 20:00:17 -07:00
revisions Run revision bump operations en masse 2019-11-25 13:55:43 -05:00
segments Filter placement API endpoint by type too 2019-07-22 23:44:52 +03:00
tag Implement filter validation 2018-07-19 04:13:43 +00:00
timestamp Merge "use sqla functions from neutron-lib" 2018-07-26 07:52:42 +00:00
trunk Wait before deleting trunk bridges for DPDK vhu 2020-04-03 21:11:57 +00:00
__init__.py Empty files should not contain copyright or license 2014-10-20 00:50:32 +00:00
provider_configuration.py use db utils from lib 2018-07-02 08:24:36 -06:00
service_base.py Make code follow log translation guideline 2017-08-14 02:01:48 +00:00