ironic-python-agent/ironic_python_agent
Dmitry Tantsur 2ab8364649
Add a jitter to heartbeat retries
Currently, if heartbeat fails, we reschedule it after 5 seconds.
This is fine for the first retry, but it can cause a thundering herd
problem when a lot of nodes fail to heartbeat at once.

This change adds jitter to the minimum wait of 5 seconds. The jitter is
not applied for forced heartbeats: they still have a minimum wait of
exactly 5 seconds from the last heartbeat.

The code is re-ordered to move the interval calculation to one place.
Bonus: correctly logging the next interval.

The unit tests have been rewritten to test the heartbeat process step by
step and not rely on the exact sequence of the calls.

Closes-Bug: #2038438
Change-Id: I4c4207b15fb3d48b55e340b7b3b54af833f92cb5
2023-12-13 17:34:24 +01:00
..
api Use Werkzeug modern version 2022-04-14 10:47:06 +00:00
cmd Revert "Fix vmedia network config drive handling" 2023-11-30 10:33:29 +00:00
extensions Remove standby.cache_image support 2023-10-24 15:02:44 -07:00
hardware_managers Add mlnx deploy_step entry to enable deploy time firmware 2023-08-31 06:35:39 -07:00
tests Add a jitter to heartbeat retries 2023-12-13 17:34:24 +01:00
__init__.py [trivial] Fix typo in __init__.py 2021-12-16 22:03:51 +01:00
agent.py Add a jitter to heartbeat retries 2023-12-13 17:34:24 +01:00
burnin.py Burn-in: Dynamic network pairing 2022-01-10 11:31:33 +01:00
config.py Merge "implement basic-auth support for user-image download process" 2023-10-13 17:08:28 +00:00
dmi_inspector.py Collect processor, memory and BIOS output of dmidecode - follow-up 2017-07-27 07:30:54 -07:00
efi_utils.py Parse efibootmgr type and details 2023-11-24 09:45:40 +13:00
encoding.py Fix serializing ironic-lib exceptions 2020-07-02 12:18:53 +02:00
errors.py Add get_service_steps logic to the agent 2023-08-31 06:22:22 -07:00
hardware.py Merge "Fix referencing to the raid_device var which is not set" 2023-12-12 17:01:32 +00:00
inject_files.py New deploy step for injecting arbitrary files 2021-02-16 16:56:52 +01:00
inspect.py Add jitter to inspection command reporting 2020-03-31 08:13:13 -07:00
inspector.py Retry in ProxyError during post inspector data 2023-12-06 12:01:35 -03:00
ironic_api_client.py Handle the node being locked 2023-08-22 16:47:28 -07:00
netutils.py Deprecate LLDP in inventory in favour of a new collector 2023-04-26 19:33:51 +00:00
numa_inspector.py Skip nic numa_node discovery if it's not assigned to a numa_node 2020-01-17 11:15:35 +01:00
partition_utils.py Replace shlex module with helper function 2023-10-12 13:34:32 -07:00
raid_utils.py Conditional creation of RAIDed ESP for UEFI Software RAID 2023-08-16 17:39:04 +02:00
tls_utils.py Generate TLS certificates with validity time in the past 2020-12-10 16:22:13 +01:00
utils.py Revert "Fix vmedia network config drive handling" 2023-11-30 10:33:29 +00:00
version.py Remove importlib-metadata from requirements 2022-06-21 17:54:39 +02:00