-
Notifications
You must be signed in to change notification settings - Fork 220
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
Fixes #17003 - DNS Plugins now support rewriting of PTR records #466
Conversation
There were the following issues with the commit message:
If you don't have a ticket number, please create an issue in Redmine, selecting the appropriate project. More guidelines are available in Coding Standards or on the Foreman wiki. This message was auto-generated by Foreman's prprocessor |
nsupdate, nsupdate_gss and dnscmd now support a new option called dns_ptr_rewritemap. You can provide a hash of regex => replacement that will be used as a map to rewrite your PTR just before it is sent to the backend.
90c8290
to
8d6daf3
Compare
Thanks for the PR! I feel that the logic of remapping of ptr records would be better implemented in foreman:
Therefore I think it would be best to split this feature into smart-proxy and foreman parts. Smart proxy dns api can be extended to accept zone during PTR record create and delete calls. Foreman part would manage mapping of ptr records to rfc2317 zones and pass this information on to smart-proxy in dns create/delete record calls. @domcleal, @dLobatog, @GregSutcliffe (and anyone else): any thoughts? |
Thank you for your comment!
You can move the implementation into foreman. The current proxy API is sufficient for this, because you don't need any additional information (i.e. the zone name is not required as it is easily derived from the PTR and nsupate doesn't need it at all).
Thus, if you try to work with RFC2317 PTRs through the current API things fail horribly (I already tried to do it that way). |
This is quite different from a "normal" ptr record creation, I would think that it warrants dedicated, backend-specific calls, something like
which can perform their own validations. We could use Please note that #465 deprecates |
I just came up with another approach that is probably much saner. |
I would prefer it if the code didn't try to guess caller's intention; a possible approach I suggested in the comment above would be to use a special record type together with a dedicated code path for creation/removal of rfc2317 records. |
I had a look at #465 and suggested another change. If that change is going to happen we would have everything in smart proxy that is required to implement rfc2317. All other changes required could then be done in foreman itself. |
@arogge this needs a rebase. |
@arogge: are you planning to continue working on this PR? |
@witlessbird not really. As you already stated it is probably better to implement the feature in foreman itself. #469 "fixes" the proxy code, so this is finally possible. |
nsupdate, nsupdate_gss and dnscmd now support a new option called
dns_ptr_rewritemap.
You can provide a hash of regex => replacement that will be used as
a map to rewrite your PTR just before it is sent to the backend.