-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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: SNMP MIBs: use the correct path when evaluating symlink #10748
Conversation
… use the directory path when evaluating the symlink
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.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 |
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 figuring this out!
@ericjohncarlson Thanks for testing so quickly. Did you also have the "translating: cannot make X numeric" error and did this PR fix that too? |
I'm sorry I did not have that |
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 patch @reimda! One question, can we add a unit-test for this case in order to make sure we don't break it in the future?
According to all the responses in #10674, it seems like this PR fixes the "cannot stat" issue. Well done! |
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.
I don't want to hold this up due to a superfluous newline. ;-)
LGTM! Thanks @reimda for fixing!
related #10674
This PR changes handling of symlinks to files when loading MIBs. Previously it would try to evaluate the parent directory's path as a symlink instead of the symlink's path.
This change should remove many "Couldn't stat target" warnings in logs like the following: