-
Notifications
You must be signed in to change notification settings - Fork 5.7k
fix(inputs.lustre2): getLustreProcStats skips empty files #16911
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
fix(inputs.lustre2): getLustreProcStats skips empty files #16911
Conversation
Thanks so much for the pull request! |
!signed-cla |
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 👍 This pull request doesn't change the Telegraf binary size 📦 Click here to get additional PR build artifactsArtifact URLs |
This avoids an "index out of range" when trying to figure out if the data should be tagged with job_id here Refs: influxdata#16631
b734a8b
to
ecec57f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
@alexvkempen Thanks for your contribution! |
Co-authored-by: Alexandre Van Kempen <alexandre.vankempen@qarnot-computing.com> (cherry picked from commit 26e1f35)
Summary
From Lustre2.16 some stats files (e.g. /proc/fs/lustre/mdt/*/job_stats) can be completely empty, whereas in previous versions there were always at least some characters at the beginning of the file (e.g. "job_stats: ")
getLustreProcStats
generates an "index out of range" crash when trying to "figure out if the data should be tagged with job_id" if the file is completely empty.This fix enables to skip empty files as there is nothing to report anyway.
Checklist
Related issues
resolves #16631