You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On some systems that cannot throttle crashing services, if crowdsec restarts in a loop for any reason (LAPI port already in use, bad configuration in docker, ....), crowdsec will try to login to CAPI each time it starts, which incurs heavy infra costs on our end (even though there's some rate limiting on the login).
We need to:
Fail early (before we attempt any query to CAPI) if we cannot start the LAPI server: we should create the net.Listener as early as possible, before the call to apiserver.NewServer (this would address the specific issue of not being able to bind the port)
Try to cache the JWT token in the database: (this would address crash loops in a more generic manner)
This would allow to reuse the token between starts and avoid a login call
Main drawback is that crowdsec won't push new scenarios to CAPI after a restart, but this can be easily worked around by scheduling a push a few minutes after the start.
This won't work when running in docker with no persistent volume configured (should we automatically disable CAPI when running with no volumes ? We already disable the hub update in this case)
The text was updated successfully, but these errors were encountered:
Check Releases to make sure your agent is on the latest version.
Details
I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.
@blotus: There are no 'kind' label on this issue. You need a 'kind' label to start the triage process.
/kind feature
/kind enhancement
/kind refactoring
/kind bug
/kind packaging
Details
I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.
On some systems that cannot throttle crashing services, if crowdsec restarts in a loop for any reason (LAPI port already in use, bad configuration in docker, ....), crowdsec will try to login to CAPI each time it starts, which incurs heavy infra costs on our end (even though there's some rate limiting on the login).
We need to:
net.Listener
as early as possible, before the call toapiserver.NewServer
(this would address the specific issue of not being able to bind the port)The text was updated successfully, but these errors were encountered: