Log processors: in-process hub update
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Start by reading the existing cron/systemd hub update flow and the configuration and reload paths. The issue identifies exprhelpers globals, appsec configuration parsing, atomic reload, and the update mechanism as separate work areas, but does not name files or tests. Done means updates run in process, validate before swapping configuration, and publish the two specified metrics.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Automated hub updates are currently handled by a cron/systemd timer that invokes cscli hub update / cscli hub upgrade then reloads crowdsec.
This works fine for deployment in VMs/bare metal, but cannot work for container/k8s/deployment (and windows currently has no support at all for hub auto updates).
We should replace the cron with an-in process update that has no external dependancies.
A new config key would be introduced:
crowdsec_service:
hub_auto_update:
enabled: true
interval: 24h
This would default to enabled (the cron would be removed in the 1st release shipping this).
When crowdsec performs an update, the new configuration would be tested then swapped with the current one (the current cron cannot handle a rollback during a config upgrade, so we will also address this).
Because this require some important internal changes, we should split the work:
- Stop relying on package level globals for exprhelpers (datafiles, geoip, ...) so that they can be swapped at runtime
- Decouple appsec configuration parsing from the datasource itself to allow for testing before loading the configuration (this would have the side effect of being able to test them with
crowdsec -t) - Implement the atomic configuration swap on reload (probably LP only at first ?): this would make crowdsec behaves more like nginx during a reload (a reload can fail, but the current version stays up), where currently we simply refuse the new config and exit.
- Implement the actual update mechanism
A successfull auto-update would kill all existing buckets (like the current reload does)
New metrics would be published:
cs_autoupdate_last_timestamp: timestamp of the last successful autoupdatecs_autoupdate_total: counter that tracks how many autoupdates with changes were performed
- Lingua principale
- Go
- Stelle
- 15.1k
- Fork
- 726
- Merge medio
- 2g 51m
- PR unite (30g)
- 18
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di crowdsecurity/crowdsec
-
[docker] Align build and debian releaseForse già presa @albundy83 l’ha presa 1 giorno fa. Apertakind/enhancement needs/triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
crowdsecurity/crowdsec#4803 · 3 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
Bucket queues preallocate all their slots when the bucket is createdForse già presa @AdzerKI l’ha presa 3 giorni fa. Apertakind/bug needs/triage os/linux
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
crowdsecurity/crowdsec#4799 · 3 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
kind/bug needs/triage os/linux
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
crowdsecurity/crowdsec#4797 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
needs/kind needs/triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
crowdsecurity/crowdsec#4795 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
kind/bug needs/triage os/linux
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
crowdsecurity/crowdsec#4790 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di crowdsecurity/crowdsec
Issue simili
-
component/mesheryctl kind/bug language/go
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
meshery/meshery#22993 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
-
frontend size:S
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
shukiv/jabali-panel#2423 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100