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 3 commits into from Aug 24, 2017


Copy link

@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.


I have:

  • read the 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
Copy link

@ahupowerdns ahupowerdns left a comment

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, do you think we could reuse those?

@rgacogne rgacogne force-pushed the rgacogne:snmp-reconnect branch from 157d97e to 5ac070a May 31, 2017
Copy link
Member Author

@rgacogne rgacogne commented May 31, 2017

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 rgacogne force-pushed the rgacogne:snmp-reconnect branch from 5ac070a to 7c114c0 Jun 27, 2017
Copy link
Member Author

@rgacogne rgacogne commented Jun 27, 2017


@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
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
@rgacogne rgacogne deleted the rgacogne:snmp-reconnect branch Sep 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.