vmware-nsx/neutron/agent
Carl Baldwin 098d99d701 L3 agent prefers RPC messages over full sync
When the L3 agent starts up and runs the sync task it doesn't process
any incoming RPC events until the sync task is complete.

This change combines the work from _rpc_loop and _sync_routers_task in
to a single loop called _process_routers_loop.  This loop spawns
threads that pull from a priority queue.  The queue ensures that RPC
messages are handled before _process_routers_loop.  The latter is
generally maintenance tasks triggered by the agent rather than user
triggered tasks.

Synchronization between RPC and sync routers loops is no longer
necessary since they both feed in to a single queue.  There were
places where it was necessary to reorder some things to allow for the
lack of synchronization.  For example, it is necessary to list
namespaces before fetching the full list of routers to ensure that it
doesn't delete a new namespace that gets created after listing
namespaces.  The lack of the need for synchronization between loops is
probably the main strength of this patch.

With multiple worker threads, need to handle the case where an RPC
message came in while a thread was working on a router.  Another
thread should not handle the same router that is already in progress.
Adds a mechanism to signal to the working thread that an update came
in for the router it is working on.  The original thread will repeat
processing the router when it is finished to get the update.
Multiple rapid updates to the same router will be consolidated.
Essentially, there is still synchronization of work for a given router
but not between routers.  Much better than before.

blueprint l3-agent-responsiveness
Closes-Bug: #1289066
Change-Id: I39afe86c66f864d71adf865d7bd1c9db35511505
2014-07-15 15:35:51 +00:00
..
common Remove the useless vim modelines 2014-06-21 15:07:31 +08:00
linux Omit mode keyword when spawning dnsmasq with some ipv6 subnets 2014-07-03 18:19:27 +04:00
metadata Remove the useless vim modelines 2014-06-21 15:07:31 +08:00
__init__.py Remove the useless vim modelines 2014-06-21 15:07:31 +08:00
dhcp_agent.py Moved rpc_compat.py code back into rpc.py 2014-06-24 10:35:39 +02:00
firewall.py Remove the useless vim modelines 2014-06-21 15:07:31 +08:00
l2population_rpc.py Apply six for metaclass 2013-11-18 17:58:58 +09:00
l3_agent.py L3 agent prefers RPC messages over full sync 2014-07-15 15:35:51 +00:00
netns_cleanup_util.py Remove the useless vim modelines 2014-06-21 15:07:31 +08:00
ovs_cleanup_util.py Remove the useless vim modelines 2014-06-21 15:07:31 +08:00
rpc.py Introduce bulk calls for get device details 2014-06-25 21:33:10 +00:00
securitygroups_rpc.py Fixed spelling mistake in securitygroups_rpc 2014-07-03 11:46:08 +03:00