293 Commits

Author SHA1 Message Date
Martin Hoffmann b6cc336631 Update changelog. 2024-05-10 11:04:26 +02:00
Martin Hoffmann 205089d2e1 Add fuzzing for payload and fix all the issues found. (#113)
This PR adds fuzzing via cargo fuzz to the payload module and adds fixes for
the issues that the fuzzer uncovered.
2024-05-10 11:03:50 +02:00
Martin Hoffmann 73602cb484 Update Cargo.lock. 2024-04-29 18:12:43 +02:00
Martin Hoffmann 5387401733 Update changelog. 2024-04-29 18:11:20 +02:00
Martin Hoffmann bbcb3b0a6f Add a merge unit. (#110)
This PR adds a new merge unit that merges the payload from all its healthy
sources.
2024-04-29 10:36:39 +02:00
Martin Hoffmann 01cda627a7 Update changelog. 2024-04-22 12:12:20 +02:00
Martin Hoffmann 6f00387dd6 Additional config options for the HTTP client. (#111)
This PR adds four new configuration options for the HTTP client used by the
json unit.

These are http-root-certs for additional TLS root certificates,
http-user-agent for setting a custom user agent, http-client-addr to specify
a local address to bind to, and http-proxies to add HTTP proxies. The last
option is only available if the socks feature is enabled which it is by
default.
2024-04-22 12:10:20 +02:00
Martin Hoffmann a1c665da4d Update changelog. 2024-04-10 12:20:10 +02:00
Martin Hoffmann 01331a6496 Allow configuring the timer values in the RTR targets. (#106)
This PR adds three optional configuration values to the RTR target
configuration that allow configuring the timer values included in an RTR
exchange.
2024-04-10 12:19:04 +02:00
Martin Hoffmann a6df70ef55 Combine payload update and setting healthy status. (#107)
This PR revises how updates are dispatched. Instead of having separate
status and payload updates, these are now merged into one with a payload
update implying a status change to healthy. This should avoid the potential
for strange races between setting the status back to healthy and updating
the data.

A resulting limitation is that if a unit wants to change from stalled to
healthy it has to submit a payload update, but in practice this health
status change is pretty much always triggered by a new payload update
becoming available, so this should be fine.

This is a breaking change.
2024-04-10 12:10:44 +02:00
Martin Hoffmann 0f6128482f Update changelog. 2024-03-20 14:15:15 +01:00
Martin Hoffmann edcc0ae73f Update dependencies. 2024-03-20 14:14:56 +01:00
Martin Hoffmann e4a8cd9696 Introduce daemonbase and use it for logging. (#94)
This PR switches the logging configuration to use the new daemonbase crate.
2024-03-20 14:13:12 +01:00
Ximon Eighteen 29d26f1bc1 Fix broken example config file. (#104)
The config file requires IP addresses, not domain names.
2024-03-18 14:35:58 +01:00
Martin Hoffmann f2b20b50bf Refactor communication to cleanly deal with start-up and shut-down. (#101)
This PR changes some aspect of the communication module to deal with startup
and shutdown of units.

In order to allow a unit or target that is started after an upstream unit
and misses updates to gain access to the last update, a gate will store the
last update and include it in its response to the subscription request. A
consequence of this is that the last update of every unit will be kept
around. In most cases, they need to be kept around, anyway – the rtr unit
needs it for diffing, the any unit needs to keep the updates for all its
sources so it can seamlessly switch –, so this shouldn’t have too much of an
impact in practice.

The PR also fixes an issue when shutting down units. In this case, the link
goes into a “gone” state. Querying the link was immediately returning with
the gone state. If the unit owning the link was looping over this link
query, it would just end up in an endless, uninterrupted loop which would
take over one of the threads of the Tokio runtime. This is fixed by having
Link::query not return in case the status is “gone” but rather just remain
in pending state forever.

In addition, the PR does a change the the handling of suspending a link.
Earlier, querying the link would un-suspend it (or rather, that was the
intention, I believe it didn’t actually do that). Now suspending and
unsuspending is just a state change communicated to the gate which then can
in turn report this to its unit for further consideration.

Finally, the PR adds both a test unit and a test target as well as changes
the manager to allow setting up a unit graph programmatically. This way,
test cases with unit graphs can be written and their behaviour asserted.
2024-03-05 14:10:39 +01:00
Martin Hoffmann b992003df3 Update changelog. 2024-02-12 16:39:09 +01:00
Martin Hoffmann f743017593 Add support for conditional HTTP requests. (#98)
This PR adds support for conditional HTTP requests via Etags and
Last-Modified to both the JSON unit and the HTTP JSON target.
2024-02-12 16:37:50 +01:00
Martin Hoffmann c79e018053 Update changelog. 2024-01-26 15:29:19 +01:00
Martin Hoffmann 87f73eeca1 Drops keeping serial number and diff with updates. (#96)
This PR removes the serial number and optional diff from payload::Update.

The serial number was never actually used anywhere so has always been
unnecessary. However, it did provide a sort of safety net for using the
optional diff in case an update was missed somehow. This, however, only ever
happened with the RTR target, so dropping the diff and re-calculating is
probably acceptable both from a performance and reliability perspective.
2024-01-26 15:27:58 +01:00
Martin Hoffmann f707d64c44 Clippy-suggested code improvements. 2023-11-21 14:17:39 +01:00
Martin Hoffmann c7fcb9d44e Update changelog. 2023-10-20 11:20:50 +02:00
Martin Hoffmann a8a7e66656 Upgrade to Plotous v7. (#90)
This PR upgrades the packaging workflow and Dockerfile to allow for
cross-compilation.
2023-10-20 11:19:30 +02:00
Martin Hoffmann b10cd6f9ae Upgrade toml to 0.8.2. (#91)
This PR upgrades toml to 0.8.2 which requires a few small changes.
2023-10-20 11:12:10 +02:00
Martin Hoffmann 59d44cb863 Update changelog. 2023-10-19 12:03:44 +02:00
Martin Hoffmann 4c10089b4b Fix slurm unit start race. (#89)
This PR fixes a race in the slurm unit that caused exceptions not processed
if loading the files took too long. As a side-effect, the unit’s output will
now be updated immediately when an update to the files has been detected
rather than only be considered when the next update from the unit’s source
comes in.

---------

Co-authored-by: Luuk Hendriks <mail@luukhendriks.eu>
2023-10-19 12:00:13 +02:00
Martin Hoffmann 4eeada7025 Only run packaging workflow on v tags or manually. 2023-10-18 12:42:21 +02:00
Martin Hoffmann 4c048830c7 Update changelog. 2023-10-18 12:25:20 +02:00
Martin Hoffmann 4a2ea0eafe Log the changes that the Slurm unit does. (#87)
This PR adds debug-level logging of what the Slurm units adds to and removes
from an update.
2023-10-18 12:23:24 +02:00
Martin Hoffmann 7242a2ffaa Upgrade Rust edition, Rust version, and dependencies. (#88)
This PR upgrades Rust to the 2021 edition and the minimal Rust version to
1.70. It also upgrades all dependencies to their latest version and fixes
all resulting issue. Finally, it includes a number of Clippy-suggested code
fixes.

This does not yet upgrade toml since it has changed in a rather breaking
way.
2023-10-18 12:10:16 +02:00
Maarten Aertsen b6b0f82d68 Normalize author field 2023-09-22 13:52:20 +02:00
Alex Band 2391ffbc4c Add mastodon badge 2023-01-24 10:46:57 +01:00
Ximon Eighteen 1d2237995d Follow move of reusable pkg workflow to new ploutos repo. 2022-11-17 23:09:10 +01:00
Alex Band c4cce6cb60 Custom 404 page 2022-10-19 16:27:23 +02:00
Ximon Eighteen 890cdd0663 Migrate to NLnetLabs reusable packaging workflow (#81) 2022-09-13 12:11:20 +02:00
ximon18 c5e446bfd1 Revert " First attempt to use a reusable pkg workflow from another (NLnet Labs) Git repo."
This reverts commit 711272adad.
2022-09-08 16:18:34 +02:00
ximon18 711272adad First attempt to use a reusable pkg workflow from another (NLnet Labs) Git repo. 2022-09-08 16:18:05 +02:00
Martin Hoffmann b71abc114b Bump version. 2022-06-13 15:53:40 +02:00
Martin Hoffmann 7861232582 Prepare for release 0.2.2. (#78) v0.2.2 2022-06-13 15:49:09 +02:00
Martin Hoffmann beed4a5ffb Update changelog. 2022-06-13 15:31:45 +02:00
Martin Hoffmann 31f231ed6c Properly print ASNs in JSON output. (#77) 2022-06-13 15:30:07 +02:00
Martin Hoffmann 2e104d2d40 Bump version. 2022-06-02 11:33:15 +02:00
Martin Hoffmann 294f46be3a Prepare for release 0.2.2-rc1. (#76) v0.2.2-rc1 2022-06-02 11:27:27 +02:00
Martin Hoffmann a8318cb797 Update dependencies. (#75) 2022-06-02 11:09:51 +02:00
Martin Hoffmann 8734d4c89b Update changelog. 2022-06-02 10:50:17 +02:00
Martin Hoffmann 66d345449f Fix JSON output formatting. (#74) 2022-06-02 10:49:26 +02:00
Martin Hoffmann e6922163b5 Fix OwnedSetIter::next. (#73) 2022-06-02 10:48:28 +02:00
Ximon Eighteen 2b1db0988d Add Ubuntu 22.04 packaging support. (#70) 2022-06-02 10:47:31 +02:00
Martin Hoffmann 300a3abf16 Bump version. 2022-03-28 12:23:03 +02:00
Martin Hoffmann 5311a0311a Prepare for release 0.2.1. (#69) v0.2.1 2022-03-28 12:11:26 +02:00
Martin Hoffmann a33a3d8dd2 Bump version. 2022-03-17 12:22:27 +01:00