neutron/neutron/agent/l3
John Schwarz 977d254cc6 Throttle SIGHUPs to keepalived
Multiple SIGHUPs in quick succession might cause the master keepalived
to forfeit its mastership (which will cause keepalived to remove IPs of
its external devices, severing connectivity). This can happen when, for
example, associating or disassociating multiple floatingips.

The patch makes the agent throttle SIGHUP sent to keepalived: the very first
SIGHUP is always sent; as for subsequent signals, they are delayed till
agent threshold is reached. (It's 3 seconds by default.)

As an example, when three consequent router updates trigger keepalived
respawn then:
* the very first signal is sent as usual;
* the second signal is deferred and sent in up to 3 seconds since the
  first signal;
* the third signal is ignored, though the change that triggered it will
  be correctly applied by the second signal handler when it is triggered
  after threshold delay.

If the last time a spawn request occurred is older than current-time
minus threshold then there is no delay.

Co-Authored-By: Jakub Libosvar <libosvar@redhat.com>
Co-Authored-By: Cedric Brandily <zzelle@gmail.com>
Co-Authored-By: Ihar Hrachyshka <ihrachys@redhat.com>

Closes-Bug: 1647432
Change-Id: I2955e0de835458a2eea4dd088addf33b656f8670
2017-03-28 03:37:09 +00:00
..
__init__.py Move classes out of l3_agent.py 2014-12-10 15:19:28 -07:00
agent.py Spin off context module 2017-03-06 16:25:29 +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 Add IPv6 Prefix Delegation support for DVR 2017-02-01 02:23:49 +00:00
dvr_fip_ns.py Change in-tree code to use moved get_ip_version() 2017-03-08 11:35:29 -05:00
dvr_local_router.py DVR: Add static routes to FIP namespace 2017-01-26 16:18:02 -08:00
dvr_router_base.py DVR: Look at all SNAT ports for a subnet match 2017-02-06 12:05:05 -05:00
dvr_snat_ns.py Clean-up L3 constant TODOs 2016-12-14 11:54:12 -05:00
fip_rule_priority_allocator.py Fix two spelling mistakes 2016-05-30 01:58:04 +00:00
ha.py Add PD support in HA router 2017-03-15 04:31:09 +00:00
ha_router.py Throttle SIGHUPs to keepalived 2017-03-28 03:37:09 +00:00
item_allocator.py DVR: Fix ItemAllocator class to handle exceptions 2016-07-14 13:05:45 -04:00
keepalived_state_change.py Remove dependency on memory heavy python-requests. 2017-02-10 17:07:44 +01: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 Fix typo in l3-agent namespace code 2016-08-09 13:15:48 -04:00
router_info.py Add PD support in HA router 2017-03-15 04:31:09 +00:00
router_processing_queue.py Modify error word "procedence" to "precedence" 2016-12-28 17:30:13 +08:00