Skip to content

Conversation

alexvkempen
Copy link
Contributor

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

  • [x ] No AI generated code was used in this PR

Related issues

resolves #16631

@telegraf-tiger
Copy link
Contributor

Thanks so much for the pull request!
🤝 ✒️ Just a reminder that the CLA has not yet been signed, and we'll need it before merging. Please sign the CLA when you get a chance, then post a comment here saying !signed-cla

@telegraf-tiger telegraf-tiger bot added the fix pr to fix corresponding bug label Apr 30, 2025
@alexvkempen
Copy link
Contributor Author

!signed-cla

@telegraf-tiger
Copy link
Contributor

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
@alexvkempen alexvkempen force-pushed the getLustreProcStats-skips-empty-files branch from b734a8b to ecec57f Compare April 30, 2025 10:32
@alexvkempen alexvkempen changed the title fix: getLustreProcStats skips empty files fix(inputs.lustre2): getLustreProcStats skips empty files Apr 30, 2025
@telegraf-tiger telegraf-tiger bot added the plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins label Apr 30, 2025
Copy link
Member

@mstrandboge mstrandboge left a 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!

@mstrandboge mstrandboge added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Apr 30, 2025
@skartikey
Copy link
Contributor

@alexvkempen Thanks for your contribution!

@skartikey skartikey merged commit 26e1f35 into influxdata:master Apr 30, 2025
24 of 26 checks passed
@github-actions github-actions bot added this to the v1.34.3 milestone Apr 30, 2025
srebhan pushed a commit that referenced this pull request May 5, 2025
Co-authored-by: Alexandre Van Kempen <alexandre.vankempen@qarnot-computing.com>
(cherry picked from commit 26e1f35)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lustre2 input causes panic at startup with Lustre 2.16
4 participants