neutron/neutron/agent/l3
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
..
__init__.py Move classes out of l3_agent.py 2014-12-10 15:19:28 -07:00
agent.py Call update_all_ha_network_port_statuses on agent start 2017-12-06 07:53:06 +00:00
dvr.py Clean-up L3 constant TODOs 2016-12-14 11:54:12 -05:00
dvr_edge_ha_router.py Remove get_router_cidrs method of dvr_edge_ha router 2017-01-19 10:37:14 -08:00
dvr_edge_router.py Ignore gre devices in namespaces when cleaning up devices 2017-06-14 16:19:14 +00:00
dvr_fip_ns.py Always call create_rtr_2_fip_link 2017-06-21 15:20:02 +00:00
dvr_local_router.py Always call create_rtr_2_fip_link 2017-06-21 15:20:02 +00:00
dvr_router_base.py DVR: Look at all SNAT ports for a subnet match 2017-02-13 21:39:59 +00:00
dvr_snat_ns.py Merge "DVR: properly track SNAT traffic" into stable/ocata 2017-06-20 18:24:17 +00:00
fip_rule_priority_allocator.py Fix two spelling mistakes 2016-05-30 01:58:04 +00:00
ha.py Disable RA and IPv6 forwarding on backup HA routers 2017-06-30 09:38:28 +00:00
ha_router.py Move check_ha_state_for_router() into notification code 2017-11-09 10:52:08 -05:00
item_allocator.py DVR: Fix ItemAllocator class to handle exceptions 2016-07-14 13:05:45 -04:00
keepalived_state_change.py Log messages for keepalived-state-change in syslog 2017-04-06 23:06:26 +00:00
l3_agent_extension.py Add L3 agent extension API object 2016-08-31 11:15:51 -04:00
l3_agent_extension_api.py Add L3 agent extension API object 2016-08-31 11:15:51 -04:00
l3_agent_extensions_manager.py Refactoring config options for l2 agent ext opts 2016-11-21 19:45:04 +00:00
legacy_router.py Don't pass config object to send_ip_addr_adv_notif() 2016-11-08 19:32:00 +00:00
link_local_allocator.py spelling error: 2016-06-30 10:17:18 +08:00
namespace_manager.py DVR: Clean stale snat-ns by checking its existence when agent restarts 2016-08-04 10:39:15 -07:00
namespaces.py Do not respond to ARP on IPv6-only interfaces 2017-07-24 11:59:50 +00:00
router_info.py Fix: set IPv6 forwarding when there's an IPv6 gw 2017-06-30 09:38:37 +00:00
router_processing_queue.py Move check_ha_state_for_router() into notification code 2017-11-09 10:52:08 -05:00