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

Add support for 'LUA' records in PowerDNS #403

Open
splk3 opened this issue Sep 16, 2019 · 4 comments
Open

Add support for 'LUA' records in PowerDNS #403

splk3 opened this issue Sep 16, 2019 · 4 comments

Comments

@splk3
Copy link

@splk3 splk3 commented Sep 16, 2019

PowerDNS Authoritative Server 4.3.0 added a new "LUA" record type that allows lua-scripted answers to be returned as answers to a DNS query. For example, a LUA record could respond to an A record request by doing a health check to a server and then returning the properly formatted IP address.

The "LUA" record also is used to implement Geo/Dynamic record types, including multiple health check mechanisms, so the README table can be updated to "Yes" for those features in OctoDNS record type(s) support.

While looking through the PowerDNS Provider, it looks like the new record type can be added pretty easily by configuring the LUA record type as another quoted type, leaving the responsibility for format and correctness to the user.

Adding the following should be sufficient (or at least a start):

(not sure if below only update docs or there are other effects)

SUPPORTS_GEO = True
SUPPORTS_DYNAMIC = True 
    SUPPORTS = set(('A', 'AAAA', 'ALIAS', 'CAA', 'CNAME', 'LUA', 'MX', 'NAPTR', 'NS',
                    'PTR', 'SPF', 'SSHFP', 'SRV', 'TXT'))

_data_for_LUA = data_for_quoted
_records_for_LUA = _records_for_quoted

If there is more required, I can look into that, as well. I'm happy to try and do a pull request, but I have very little python experience and will have to start from scratch getting the development environment set up for testing.

Thanks in advance and having great success with OctoDNS with PowerDNS already!

@ross
Copy link
Contributor

@ross ross commented Sep 16, 2019

Hi @splk3 At a high level octoDNS is focused on providing homogenous support across multiple providers and as such historically hasn't adding support for the special types of records that individual providers offer. The SUPPORTS stuff has made that less of a mess than it originally was, but it's still not been something we've looked into/thought about mostly b/c it'll bloat the base/shared parts of things quite a bit over time.

@splk3
Copy link
Author

@splk3 splk3 commented Sep 16, 2019

@ross - thanks for the quick response.

I totally understand. I just really like using OctoDNS to manage some of my DNS servers, and sharing changes among team members by having data separate from system/services/etc. has made that really nice. With GSLB-related things and PowerDNS, I'm stuck using template-based configurations, which aren't nearly as nice in terms of the feedback I can build into the pipelines for testing and implementing changes.

Please let me know what I can do to help determine if this is something that is a possibility to be accepted or not, so I can do a little bit more longer-ish term planning. Again, I'm more than happy to make the necessary changes, assuming that I am up to it technically. I certainly don't want to strain the resources of the team for a fringe feature that isn't likely to be used elsewhere any time soon.

@ross
Copy link
Contributor

@ross ross commented Sep 16, 2019

I don't mind it conceptually now that things will generally default to ignoring things they don't understand (and if they don't it's a bug.) Without having put too much thought into it and zero looking into if it'd actually work I think the best option would likely be to give providers a way to dynamically install custom record types that would only apply to them. It'd probably be fun to look into and implement, but given that we don't have a use-case for it internally it's not likely to rise in priority enough for me to dig into implementing it.

@splk3
Copy link
Author

@splk3 splk3 commented Sep 17, 2019

ok thanks. I'll look into testing it out myself and see if it is doable. Worst-case, it's a small change and we can consider whether or not we want to just have a custom provider for our own or keep things as-is. worth learning the process, in any case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.