-
Notifications
You must be signed in to change notification settings - Fork 574
Description
What would you like to be added?
Thanks a lot for the awesome project crowdsec.
Currently, when using a data source with a source_url in a parser or whitelist, a failure to fetch the remote file (e.g., 404, DNS issues, or timeout) causes the CrowdSec Hupupdate Service process to fail.
This is problematic for automated updates (cscli hub update && cscli hub upgrade), as it can leave the engine in an inconsistent state or prevent a restart.
Proposed Solution: I propose a more resilient approach for remote data sources:
-
Stale Data Fallback: If the HTTP download fails, CrowdSec should log a warning but continue to use the existing local version of the file (dest_file) if it exists.
-
Non-Blocking Update: The hub update or service reload should not return an error code if the failure is limited to a remote data source fetch and a local copy is available.
-
Notification Support: Trigger an alert (which can then be handled by the existing notification system, e.g., email, Slack, HTTP plugin) to inform the administrator that the data source update failed and stale data is being used.
Thanks a lot.
Why is this needed?
This is problematic for automated updates (cscli hub update && cscli hub upgrade), as it can leave the engine in an inconsistent state or prevent a restart.