OpenStack Networking (Neutron)
Go to file
Rodolfo Alonso Hernandez 8b7d2c8a93 Refactor the L3 agent batch notifier
This patch is the first one of a series of patches improving how the L3
agents update the router HA state to the Neutron server.

This patch partially reverts the previous patch [1]. When the batch
notifier sends events, it calls the callback method passed during the
initialization, in this case AgentMixin.notify_server. The batch
notifier spawns a new thread in charge of sending the notifications and
then wait the specified "batch_interval" time. If the callback method is
not synchronous with the notify thread execution (what [1] implemented),
the thread can finish while the RPC client is still sending the
HA router states. If another HA state update is received, then both
updates can be executed at the same time. It is possible then that a new
router state can be overwritten with an old one still not sent or
processed.

The batch notifier is refactored, to improve what initally was
implemented [2] and then updated [3]. Currently, each new event thread
can update the "pending_events" list. Then, a new thread is spawned to
process this event list. This thread decouples the current execution
from the calling thread, making the event processing a non-blocking
process.

But with the current implementation, each new process will spawn a new
thread, synchronized with the previous and new ones (using a
synchronized decorator). That means, during the batch interval time, the
system can have as many threads waiting as new events received. Those
threads will end secuentially when the previous threads end the batch
interval sleep time.

Instead of this, this patch receives and enqueue each new event and
allows only one thread to be alive while processing the event list. If
at the end of the processing loop new events are stored, the thread will
process then.

[1] I3f555a0c78fbc02d8214f12b62c37d140bc71da1
[2] I2f8cf261f48bdb632ac0bd643a337290b5297fce
[3] I82f403441564955345f47877151e0c457712dd2f

Partial-Bug: #1837635

Change-Id: I20cfa1cf5281198079f5e0dbf195755abc919581
2019-08-01 17:11:04 +00:00
api-ref Fix some typos 2016-06-28 22:46:19 +02:00
bin Use os-xenapi for neutron when XenServer as hypervisor 2017-03-30 18:33:37 +00:00
devstack Switch to use configure_keystone_authtoken_middleware in devstack plugin 2019-07-01 13:50:33 +02:00
doc Switch neutron tempest jobs to run only networking related tests 2019-07-15 20:07:57 +00:00
etc Merge "Remove rootwrap filters for TC commands in Linux Bridge" 2019-07-09 13:43:00 +00:00
neutron Refactor the L3 agent batch notifier 2019-08-01 17:11:04 +00:00
playbooks OpenDev Migration Patch 2019-04-19 19:38:27 +00:00
rally-jobs Rally task definition for port binding scenario 2019-07-08 13:25:46 +02:00
releasenotes Remove the l2pop agent_boot_time config 2019-07-10 19:34:25 +00:00
roles Add "project_name" variable to configure_functional_tests role 2019-05-22 15:30:46 +02:00
tools Functional testing script password update 2019-07-16 10:26:20 +00:00
.coveragerc Cleanup coverage configuration 2016-10-17 17:06:19 +05:30
.gitignore Removing existing dirs from .gitignore 2019-05-31 13:35:30 +00:00
.gitreview OpenDev Migration Patch 2019-04-19 19:38:27 +00:00
.mailmap Add mailmap entry 2014-05-16 13:40:04 -04:00
.pylintrc Fix pylint R1717 (consider-using-dict-comprehension) refactor messages 2019-03-14 23:19:58 +00:00
.stestr.conf Fix post gate hook to accommodate for new os-testr 2017-09-12 14:20:12 -06:00
.zuul.yaml Rename tripleo-ci-centos-7-scenario007-standalone job 2019-07-19 15:25:06 +02:00
babel.cfg Use babel to generate translation file 2013-01-24 00:20:32 +08:00
bindep.txt Add libffi-dev to bindep.txt 2017-06-13 19:26:49 +00:00
CONTRIBUTING.rst Update link for contribution 2017-08-31 16:44:51 +02:00
HACKING.rst Update the documentation link for doc migration 2017-07-22 18:46:13 +09:00
LICENSE Adding Apache Version 2.0 license file. This is the official license agreement under which Quantum code is available to 2011-08-08 12:31:04 -07:00
lower-constraints.txt Propagate profiler info into BatchNotifier threads 2019-07-09 13:28:33 +02:00
README.rst Update mailinglist from dev to discuss 2018-12-12 12:44:12 +08:00
requirements.txt Propagate profiler info into BatchNotifier threads 2019-07-09 13:28:33 +02:00
setup.cfg fix NetworkSegmentRange OVO entry point 2019-06-06 09:31:26 -06:00
setup.py Updated from global requirements 2017-03-04 11:19:58 +00:00
test-requirements.txt Blacklist bandit 1.6.0 due to directory exclusion bug 2019-05-09 21:00:54 -04:00
TESTING.rst Merge "Fix some formatting issues in TESTING.rst" 2019-04-25 12:10:35 +00:00
tox.ini Start enforcing E125 flake8 directive 2019-07-19 23:39:41 -04:00

Team and repository tags

image

Welcome!

To learn more about neutron:

Get in touch via email. Use [Neutron] in your subject.

To learn how to contribute:

CONTRIBUTING.rst