neutron/neutron/common
John Schwarz 23ded198e6 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>

Conflicts:
	neutron/agent/linux/keepalived.py
	neutron/common/utils.py
	neutron/tests/fullstack/test_l3_agent.py

Closes-Bug: 1647432
Change-Id: I2955e0de835458a2eea4dd088addf33b656f8670
(cherry picked from commit 977d254cc6)
2017-03-29 04:49:51 +00:00
..
__init__.py Update License Headers to replace Nicira with VMware 2014-02-27 08:11:15 +00:00
_deprecate.py debtcollector for globals 2016-08-30 10:18:19 -04:00
cache_utils.py cache_utils: fixed cache misses for the new (oslo.cache) configuration 2016-06-16 23:07:40 +02:00
config.py Reduce log level for ryu in OVS agent log 2016-09-12 07:35:50 +00:00
constants.py debtcollector for globals 2016-08-30 10:18:19 -04:00
eventlet_utils.py Add eventlet monkey_patch helper 2015-03-24 08:44:00 -07:00
exceptions.py debtcollector for globals 2016-08-30 10:18:19 -04:00
ipv6_utils.py Correct fix for IPv6 auto address interfaces 2016-09-27 15:19:11 +00:00
profiler.py Add OSprofiler support 2016-05-20 11:35:59 -05:00
rpc.py Use from_dict to load context params 2016-07-12 13:49:41 +10:00
test_lib.py Revert "Removed test_lib module" 2015-06-29 08:27:41 +00:00
topics.py RPC Callback rolling upgrades reporting, and integration 2016-03-01 11:20:48 +01:00
utils.py Throttle SIGHUPs to keepalived 2017-03-29 04:49:51 +00:00