Skip to content
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

SNMP: Handle SNMP alarms so we can reconnect to the master #5328

Merged
merged 3 commits into from Aug 24, 2017

Conversation

rgacogne
Copy link
Member

@rgacogne rgacogne commented May 16, 2017

Short description

If the connection to the master is lost, the SNMP subagent API inserts an alarm to try to reconnect after a certain delay.
Should fix #5327.

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled and tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)
  • checked that this code was merged to master

ahupowerdns
ahupowerdns previously requested changes May 16, 2017
Copy link
Contributor

@ahupowerdns ahupowerdns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now I know you are a really smart person, but it is my recollection select() craps out after "n" file descriptors. And one day we'll reach 'n'. We have some pretty reasonable 'poll' helpers in misc.cc, do you think we could reuse those?

@rgacogne
Copy link
Member Author

Pushed two new commits who:

  • detect and use Net-SNMP's snmp_select_info2() when available
  • use our FDMultiplexer instead of select()
  • enable SNMP support for the recursor in Travis

This allows to support file descriptors larger than FD_SETSIZE when Net-SNMP is recent enough (>= 5.5). As always when working with Net-SNMP, a huge thanks to Vincent Bernat!

@rgacogne
Copy link
Member Author

Rebased.

@Habbie Habbie dismissed ahupowerdns’s stale review Jul 6, 2017

code has been changed to use FDMultiplexer instead of select

@Habbie Habbie added this to the rec-4.1.0 milestone Aug 23, 2017
@aerique aerique merged commit da2869b into PowerDNS:master Aug 24, 2017
@rgacogne rgacogne deleted the snmp-reconnect branch Sep 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DNSDIST] snmp agentx stops working after snmp service restart
4 participants