-
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
feat(inputs.powerdns_recursor): Support for new PowerDNS recursor control protocol #9633
Conversation
Since version 4.5.0, the PowerDNS recursor control protocol was updated to include a 32-bit status code before each request and response. This commit adds a new configurable option (`new_control_protocol`) that can be enabled to allow telegraf to properly communicate with newer servers.
Thanks so much for the pull request! |
!signed-cla |
Looks like new artifacts were built from this PR. Get them here!Artifact URLs |
Are there any plans to merge the PR into release? With PowerDNS Recursor v4.6 the error message is different, but I believe it's the same issue
|
I resolved the conflict, however, tests and linters are failing. Once tests are passing, artifacts will attach to this PR which you can download and use. If you could confirm those artifacts resolve the issues on newer versions of PowerDNS Recusrsor that would be very helpful. |
@powersj I've pushed some fixes for the tests and linters, and everything should pass checks as expected now 🤞. I currently can't test on PDNS 4.6 but if @ajoergensen can once this is built it would be great! |
👍 This pull request doesn't change the Telegraf binary size 📦 Looks like new artifacts were built from this PR. Expand this list to get them here ! 🐯Artifact URLs |
I still get the same error:
Config looks like this
I will try and debug more tomorrow. |
I have installed the 1.22.0 snapshot on all my PowerDNS Recursor servers; on those running 4.5.x I am now getting data again, so the fix is working as expected. On my test servers (running 4.6.0) I get the same error as mentioned before:
I'm not sure how to debug the issue. |
This probably means that they changed something in the protocol again. We'll be updating our servers to 4.6.0 sometime soon so I'll be debugging this then, but until then I can't offer any tips. |
Actually, looking at the changelog for 4.6.0 I came across this which would explain this issue. |
Has any progress been made on this or can Telegraf not poll PowerDNS (v4.7) via unix_socket? |
Too bad this hasn't made any progress yet. |
@OrfeasZ I see that you have rebased on master. Is this ready to go? The last conversation with @ajoergensen made it seem that there was still development to do? Thanks! |
It is not, I just updated my copy. Currently working on adding support for the new protocol. |
This is basically ready but I have only tested it locally. We'll roll it out gradually on our infrastructure and I'll report back / send patches if there's any issues as that happens. |
I should note that, in attempting to maintain backwards-compatibility with all versions (including the one this PR was originally targetting), the original description is no longer valid. The newly introduced variable is now
These versions are arbitrary since this protocol is internal and the powerdns devs don't version it. |
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.
@OrfeasZ huge thank you for doing this PR.
I have thrown in some suggestions that would be nice to see you take a look at. If you don't have time, let us know and I can see about taking this PR over.
Thanks!
Co-authored-by: Joshua Powers <powersj@fastmail.com>
Provide a better explanation of version compatibility and how / when to adjust it.
@powersj this is good to go from my side 👍 |
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 changes!
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 update @OrfeasZ! Two small requests in the code and one suggestion, then we are good to go I think.
Should prevent panics in the case PowerDNS updates their implementation and returns data not conforming to what we expect.
@srebhan Made the changes you requested. Let me know what you think about the endianness thing above! |
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.
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.
@OrfeasZ nice update. Can you please make the one if-else block a switch so we can land this today!?
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>
@srebhan done |
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
Required for all PRs:
Since version 4.5.0, the PowerDNS recursor control protocol was updated to include a 32-bit status code before each request and response. This commit adds a new configurable option (
new_control_protocol
) to the PowerDNS Recursor input plugin that can be enabled to allow telegraf to properly communicate with newer servers. These changes preserve backwards compatibility with existing configurations.fixes: #12252
fixes: #9494