-
Notifications
You must be signed in to change notification settings - Fork 81
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
exec of rndc reload fails #91
Conversation
If a domain is in 2 or more views the rndc exec fails because it has a duplicate name.
I've hit another problem with this. I have zones in multiple views but the rndc exec just does |
Uses an rndc dump of all zones to work out what zones this view is in to they can be correctly reloaded.
Ok, I've had another attempt at making this work. Now when a managed zone config is created/updated |
I think the reload command probably just needs the class and view parameters supplied in that case. E.g.
|
Now that I think about it, that would actually be quite hard to do, since the zones are included in a view post-definition rather than being defined in the view. |
@inkblot Yes, specifying the class and view of the zone allows the reload to work. My second attempt at a fix uses the rndc dumpdb command to find which views a zone is part of. This is quite hacky but could not figure out a cleaner way to do this because as you point out the zones are included in a view post-definition. |
I'm going to take a look at what would be necessary to flip that around so that it doesn't have to be hacky. |
Short of a breaking API change, I can't think of any other way. |
Only slightly less hacky:
Key differences:
|
One problem that I have just hit with my method (and will also affect your version) is that sometimes this fails when adding a brand new zone. I'm not sure how to resolve this - adding an artificial Any ideas? |
I kind of had an idea that I spent an hour on yesterday that I couldn't get to work. The idea I had was to have puppet drop hints onto the system separate from the BIND configuration that the The first approach I tried was to add formatted comments to the The second approach I tried might be made to work, but I didn't have the energy yesterday to think it all the way through. It was to use a Now that I'm back at the keyboard I'm inclined to try the script idea again, but instead of templating the data into the script, just write a script that can read mappings that are written out to some other simple mapping. |
I too was thinking about possible solutions last night and I am wondering if it might be possible to do something with puppet virtual resources to collect the relevant information from the view declarations then realize the updated zones in the form of the rndc reload. If I get some time later this week I will try playing around with the idea. |
It turns out the `rndc` command that was intended to reload a managed zone wasn't working (see PR #91 for reference) if more than one view included the zone. The helper script is really just a wrapper around the `rndc` command itself, it translates its final parameter into a domain/class/view tuple and pass the leading parameters and the tuple to `rndc`.
Ok. I have a thing that I think works, but none of my zones anywhere have |
Thanks for your work on this. It looks to be working well once the 2 fixes in #98 are applied. |
If a domain is in 2 or more views the rndc exec fails because it has a duplicate name.