[L3] Use processing queue for network update events
Router_info's _process_internal_ports() method is the one which is
manipulating router_info.internal_ports cache and network_update()
method from the L3 agent is relying on that Router_info's cache to
check if updated network is connected to the router or not.
So they shouldn't be run together as that may cause some race conditions
and unexpected issues, like e.g. described in the related bug.
Until now, network_update event was the only one which was processed
without using queue of events. And because of that such race condition
as described above were possible.
To fix that, this patch changes network_update method in the way that it
now adds update events for each router hosted by agent to the queue.
Those events for single routers are then processed, checks if network is
actually connected to the router and if yes, schedules router update to
be processed.
Conflicts: neutron/agent/l3/agent.py
Closes-Bug: #1933234
Change-Id: I2efe66a7415f7a18fb85bd2536a1901e751d6203
(cherry picked from commit 6ce48c30bdc153e75c4b9b409203f472b065c11b)
(cherry picked from commit 604b055c71c374bcf517359c118ace267e3a4ab1)
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/803574 /opendev. org/openstack/ neutron/ commit/ 05d0bc6d500aaaf e26fd667a761dae 408a8c8ef8
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/victoria
commit 05d0bc6d500aaaf e26fd667a761dae 408a8c8ef8
Author: Slawek Kaplonski <email address hidden>
Date: Wed Jul 7 12:00:14 2021 +0200
[L3] Use processing queue for network update events
Router_info's _process_ internal_ ports() method is the one which is info.internal_ ports cache and network_update()
manipulating router_
method from the L3 agent is relying on that Router_info's cache to
check if updated network is connected to the router or not.
So they shouldn't be run together as that may cause some race conditions
and unexpected issues, like e.g. described in the related bug.
Until now, network_update event was the only one which was processed
without using queue of events. And because of that such race condition
as described above were possible.
To fix that, this patch changes network_update method in the way that it
now adds update events for each router hosted by agent to the queue.
Those events for single routers are then processed, checks if network is
actually connected to the router and if yes, schedules router update to
be processed.
Conflicts:
neutron/ agent/l3/ agent.py
Closes-Bug: #1933234 18fb85bd2536a19 01e751d6203 75c4b9b409203f4 72b065c11b) cf517359c118ace 267e3a4ab1)
Change-Id: I2efe66a7415f7a
(cherry picked from commit 6ce48c30bdc153e
(cherry picked from commit 604b055c71c374b