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

Projects
None yet
4 participants
@rgacogne
Member

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

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

This comment has been minimized.

Show comment
Hide comment
@rgacogne

rgacogne May 31, 2017

Member

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!

Member

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

This comment has been minimized.

Show comment
Hide comment
@rgacogne

rgacogne Jun 27, 2017

Member

Rebased.

Member

rgacogne commented Jun 27, 2017

Rebased.

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

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@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