neutron/neutron/api
venkata anil 385ac553e3 Call update_all_ha_network_port_statuses on agent start
As explained in bug [1] when l3 agent fails to report state to the
server, its state is set to AGENT_REVIVED, triggering
fetch_and_sync_all_routers, which will set all its HA network ports
to DOWN, resulting in
1) ovs agent rewiring these ports and setting status to ACTIVE
2) when these ports are active, server sends router update to l3 agent
As server, ovs and l3 agents are busy with this processing, l3 agent
may fail again reporting state, repeating this process.

As l3 agent is repeatedly processing same routers, SIGHUPs are
frequently sent to keepalived, resulting in multiple masters.

To fix this, we call update_all_ha_network_port_statuses in l3 agent
start instead of calling from fetch_and_sync_all_routers.

[1] https://bugs.launchpad.net/neutron/+bug/1731595/comments/7
Conflicts:
	neutron/agent/l3/agent.py
        neutron/api/rpc/handlers/l3_rpc.py

Note: This RPC update_all_ha_network_port_statuses is added in only pike
and later branches. In older branches, we were using get_router_ids RPC
to invoke _update_ha_network_port_status. As we need to invoke this
functionality during l3 agent start and get_service_plugin_list() is the
only available RPC which is called during l3 agent start, we call
_update_ha_network_port_status from get_service_plugin_list.

Change-Id: Ia9d5549f7d53b538c9c9f93fe6aa71ffff15524a
Related-bug: #1597461
Closes-Bug: #1731595
(cherry picked from commit 9ab1ad1433)
(cherry picked from commit a6d985bbca)
2017-12-06 07:53:06 +00:00
..
rpc Call update_all_ha_network_port_statuses on agent start 2017-12-06 07:53:06 +00:00
v2 fix overaggressive 403->404 conversion 2017-09-11 19:58:49 +00:00
views Added trailing slash in link to Networking API v2.0 2016-10-12 16:48:09 +03:00
__init__.py Added API extensions to detect sorting/pagination features 2016-08-01 22:57:15 +02:00
api_common.py Add filter check for quering 2017-01-06 05:31:33 +00:00
extensions.py Merge "Use ExtensionDescriptor from neutron-lib" 2016-12-06 02:04:42 +00:00
versions.py Pecan: Allow unauthenticated version listing 2016-03-11 16:45:28 -08:00