fix: avoid unused fsnotify watchers in file cat mode#4484
Conversation
|
@immanuwell: There are no 'kind' label on this PR. You need a 'kind' label to generate the release automatically.
DetailsI 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. |
|
@immanuwell: There are no area labels on this PR. You can add as many areas as you see fit.
DetailsI 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. |
|
/area configuration |
|
/kind fix |
Summary
mode: catwas still creating anfsnotifywatcher, even though oneshot reads dont use it.On boxes that are already close to
fs.inotify.max_user_instances, that can fail early with:could not create fsnotify watcher: couldn't initialize inotify: too many open filesThis keeps watcher creation in tail mode only, and closes it if tail config bails early. small fix, real footgun.
Repro
/proc/sys/fs/inotify/max_user_instances.mode: cat.Checks
go test ./pkg/acquisition/modules/file -run 'TestConfigure|TestOneShot' -count=1related-ish: #2605 #4074
/kind fix