neutron/neutron/api/rpc/agentnotifiers
Oleg Bondarev 6902c87048 DVR: notify specific agent when creating floating ip
Currently when floating ip is created, a lot of useless action
is happening: floating ip router is scheduled, all l3 agents where
router is scheduled are notified about router update, all agents
request full router info from server. All this becomes a big
performance problem at scale with lots of compute nodes.

In fact on (associated) Floating IP creation we really need
to notify specific l3 agent on compute node where associated
VM port is located and do not need to schedule router and
bother other agents where rourter is scheduled. This should
significally decrease unneeded load on neutron server at scale.

Partial-Bug: #1486828
Change-Id: I0cbe8c51c3714e6cbdc48ca37135b783f8014905
(cherry picked from commit 865dc46bc5)

=========

DVR: Notify specific agent when update floatingip

The L3 agent was determined when update floatingip.
So notify the specific agent rather than notify all agents.
This will save some RPC resources. This is only for DVR routers.
Legacy and HA routers notify only the relevant agents.

This reproposes commit 52e91f48f2
which was reverted by commit a2f7e0343a
because of Ironic gate failures.
Now the patch preserves original behavior for legacy routers and
should not break Ironic tests.

Partial-Bug: #1486828
Related-Bug: #1507602
Change-Id: I4ef7a69ad033b979ea0e29620a4febfe5e0c30dd
(cherry picked from commit 8a51ddf3be)

=========

Use admin context when requesting floating ip's router info

Currently it is possible for admin to create router and add any
tenant subnet to it, thus connecting the subnet to the external
network. In this case tenant user can assign floating ips to its
VMs though it does not own the router.
For proper notification we need to get router info using admin
context.

Closes-Bug: #1507602
Change-Id: I17330ddca577d15e42c13ef0af96d56e6f20abd7

=========

Three patches are squashed because the first one introduced a regression
when some notifications were not sent in particular scenarios. Two
consequent patches target the regression.

Change-Id: I0cbe8c51c3714e6cbdc48ca37135b783f8014905
2016-01-04 09:23:57 +01:00
..
__init__.py Remove invalid copyright headers under API module 2014-04-02 11:09:03 -07:00
dhcp_rpc_agent_api.py Add check that list of agents is not empty in _get_enabled_agents 2015-12-17 15:12:36 +00:00
l3_rpc_agent_api.py DVR: notify specific agent when creating floating ip 2016-01-04 09:23:57 +01:00
metering_rpc_agent_api.py Python3: use six.iteritems() instead of dict.iteritems() 2015-06-01 23:13:42 +02:00