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

Automatically install and configure DNS root hints #9

Merged
merged 2 commits into from Sep 30, 2013
Merged

Automatically install and configure DNS root hints #9

merged 2 commits into from Sep 30, 2013

Conversation

nicwaller
Copy link
Contributor

Here is a possible solution to issue #7 about not having root hints available. I tried to copy the existing patterns as much as possible.

This patch relies on the use of exec to download the latest root hints from IANA. I think it's reasonable to assume that a DNS server has curl available and can contact the IANA webserver. The exec runs only if the hints file is missing, which is normally only on the first run.

Originally I was going to add extra parameters for customization, but I ended up keeping it simple after running into a couple problems:

  • Unbound is chrooted, so it can't access files outside of the /etc directory. There isn't really any reason for somebody to customize the path to the root hints file.
  • I was going to add a parameter that makes fetching root hints optional, but I wasn't sure how to handle the requires dependency correctly with the cron resource wrapped inside an if {} statement. Maybe the before metaparameter would work better?
  • I was considering adding a cron resource that would update the root hints file, but I don't know of an elegant way to avoid the "thundering herd" problem that would result in a lot of simultaneous queries to the root hints servers if many servers were using this module.

@nicwaller
Copy link
Contributor Author

This patch is was developed with Puppet 3.2.4 on Scientific Linux 6.4 (osfamily=redhat) and selinux in enforcing mode.

@nicwaller nicwaller mentioned this pull request Aug 19, 2013
zachfi pushed a commit that referenced this pull request Sep 30, 2013
Automatically install and configure DNS root hints
@zachfi zachfi merged commit 61791e3 into voxpupuli:master Sep 30, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants