Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix filter reloading #28

Closed
wants to merge 42 commits into from
Closed

Fix filter reloading #28

wants to merge 42 commits into from

Conversation

ximon18
Copy link
Member

@ximon18 ximon18 commented Oct 3, 2023

Check on filter reload (rather than init) for filter modification requiring VM rebuild.

TODO: Add a unit test.

…, fix typos and make various improvements to the config file text and structure.
When run without --config the embedded copy of etc/rotonda.conf is used instead, and targets.proxy is removed if --proxy-destination is not supplied on the command line.

If --bgp-listen or --bmp-listen are supplied on the command line they override the BMP and BGP listen settings in the embedded config.

- Allow BGP peers to be missing.
  - Add missing semi-colon.
  - Filter out not in.
…ined in roto scripts loaded from a roto script directory.

- Refactors roto script file reading from the units/targets to the Manager.

- Checks script loading, compilation and valid filter names at config load time instead of at filter execution time.

- Add MVP behaviour tests (WIP).

- Introduces a FilterName type.
…e required .roto files, e.g. if running from `cargo install`. Cleanup config initialisation and standard variable naming.
…ts_dir` dir `etc` doesn't exist.

This change had several knock on effects:
- Introduced RotoError::LoadError.
- Upgrade clap crate to fix bug with clap switcing help on own line or not even when disabled.
- Upgrade toml crate to fix inconsistent line breaks in diagnostic dump of post-processed config TOML.
- Adjust position handling in `Marked` due to changes in serde_spanned pulled in by other crate upgrades.
- Added new cmd line arg --print-config-and-exit and introduced `Terminated` for use in cases where `ExitError` wrongly limits us to just an error exit rather than a normal exit.
- Various minor tweaks to the clap config for improved read and usability.
- Log when exiting.
…ment to set the destination in MVP mode. Also make the MQTT unit consistent with the BMP proxy unit by having a destination setting rather than individual server_host and server_port settings.
ximon18 and others added 12 commits September 21, 2023 14:19
* Update rotonda-* deps.
* Roto compiler API changes, incl. compile only once instead of on first use in every thread.
* Typo fixes and improvements in comments.

Other:
* Nothing to do message on SIGHUP.
* Bug fix: When removing a loaded script, scoped scripts that reference the removed parent script should NOT be retained.
* Trigger CI on push to main and on PR changes, not just on demand.
* For CI ensure the correct Rust toolchain version is installed (as it is less likely to be kept updated in a self-hosted runner).
* Applied some Clippy suggestions.

---------

Co-authored-by: ximon18 <[email protected]>
Base automatically changed from add-default-mvp-config to blocks-wip October 9, 2023 13:01
@density215 density215 closed this Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants