-
Notifications
You must be signed in to change notification settings - Fork 1.7k
in_tail: permission error handling #10690
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Kyosuke Kariya <[email protected]>
WalkthroughA new boolean configuration option, Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant TailPlugin
participant FileSystem
User->>TailPlugin: Start plugin with skip_permission_errors option
TailPlugin->>FileSystem: Perform glob scan (with GLOB_ERR)
FileSystem-->>TailPlugin: Permission error (GLOB_ABORTED)
alt skip_permission_errors enabled
TailPlugin->>TailPlugin: Log warning, retry glob scan (without GLOB_ERR)
FileSystem-->>TailPlugin: Return accessible files/directories
TailPlugin->>User: Continue processing
else skip_permission_errors disabled
TailPlugin->>User: Fail plugin initialization
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related issues
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Signed-off-by: Sandy Chen <[email protected]>
Signed-off-by: Sandy Chen <[email protected]>
3c8411f
to
90999fb
Compare
Thanks @kyo-ke 🙌 — solid work on the glob fallback logic! The new skip_permission_errors option makes the tail input plugin far more resilient in real-world scenarios where permission inconsistencies are common (especially in multi-tenant environments or containerized workloads). We've tested the changes with a mix of readable and unreadable directories, and the plugin now gracefully logs warnings and continues scanning valid paths as expected. No memory leaks observed via Valgrind, and everything looks clean on our end. |
Changer glob logic for tail input plugin.
Currently if path wildcard matches directories which have insufficient permission, entire tail plugin will fail.
By this PR just show warn and keep reading from file with sufficient permission and just show warning.
#10656
Enter
[N/A]
in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-test
label to test for all targets (requires maintainer to do).Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.
Summary by CodeRabbit
New Features
Bug Fixes