-
Notifications
You must be signed in to change notification settings - Fork 52
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
SOA details not settable when using powerdns_zone #70
Comments
it seems like you are asking 2 questions here. Regarding the second one the |
Here we are limited with what PowerDNS API exposes and enables us to set when creating zone: https://doc.powerdns.com/authoritative/http-api/zone.html#zone Unless all SOA details are settable via PowerDNS API, the provider will not be able to make them settable. |
@mbag thank you for you time to answer :) i try to descibe the core problem better. it is not about setting this or that config value for powerdns it is about being able to use the provider without incresing the serial manually. it makes no difference for me to add a dedicated from UX perspective the user simply want to
if under the hood multiple api calls or only one are fired don't matter. as you described it is not possible to set SOA via the zone api. that means we have to handle the SOA record by using if it is a real requirement to have a 1:1 "connection to the api" what is the intended way for being able to create zone and multiple records while editing records automatically increases the serial without having a conflict with terraform? now the sutiation is quite unhandy as having a SOA record via so how to overcome this without disabling the whole powerdns serial feature and increasing the serial manually (and everytime forgetting to do it and wondering why the dns replicas are not updating)? do you know what i mean? i am not native english so please ask if i explained something unclear. |
by adding this, the provider would become more than a thin client. It would need to keep up with Powerdns server's logic on when to updated serial. And also be aware if all changes to the zone, described in
it's not, but it's not that easy to combine mutliple API calls (the example of this would be implementing #63 which I still haven't gotten around to). The NS record in this case is different as it doesn't change dynamically as the SOA does. And also provider doesn't have to keep some logic on it's side to make decisions when to change NS server and when not, like in case of SOA.
I don't have misconfigured powerdns server. But if I had to change SOA, I would do it outside of the But if you know how to solve this problem, I'm opened to reviewing the pull request or helping with concrete implementation. |
Hello, Well, SOA is put in the RRSet of the zone, but as told, you can't put it when the zone is created. It must be treated as a classic record. I ran in the same issue as you are experiencing. I have a glimpse of a solution that I need to ensure. I first wished to overwrite the serial in the provider directly but I think it's not a good design. What I'd like to achieve is:
This strategy is viable only if you use the soa_edit_api (the DEFAULT is a good one). With the soa_edit_api set to a strategy, the serial from the SOA is supposed to be recomputed by the server. Then if you change any other values in the SOA you can set the serial to whatever it will be replaced and trigger notifications to the slaves as well. |
Hello, Running this code works with the patch I submitted in #72 (you don't need data even if I added it) and SOA_EDIT_API set to default (but I any option but none should work):
This code will:
Modifying the code (add/remove/update other records) will trigger a refresh each time, and SOA value will be updated in your tfstate but will match the computed value, not triggering an update. The other changes will update the serial, as PowerDNS will do it itself. I have planned to have a separate tfstate with this data (zone, SOA and nameservers A value) and another with the records. The zone lifecycle will occasionally require these records update when the content will be frequently updated by users with their code. @c33s you can pull the "forkPreview" branch from my fork and build the provider for a test. You would have to install it manually then. Regards |
As workaround I use this settings in powerdns configuration:
|
Thank you @selfuryon for the settings. It is new in 4.4 and I have to say that I was talking to the PDNS team before christmas to know when the would release the 4.4 but they didn't mention this new seting and continue to work on the TF provider. This is a great workaround if you want to apply a standard SOA configuration. I am going to check this, even if I'll continue to say that the PR is harmless, it may become useless for a lot of adopters with this new setting though. |
Hello here, I have definitely chosen to use @selfuryon tips. Since Feb, there has been several terraform release. We are struggling on other projects with their imposed idea of always displaying external changes. There's often differences between providers and software behaviour (like in openstack) and we always have plans that should be blank filled with loads of external changes (ie a tag not set in terraform but the software setting it as an empty list just pops up in the plan ...) This is why my proposal has become a terrible idea as it would quite often shows the changed serial in the plan. |
this issue is related to #43 and #45
currently the provider has still its problem, it can't handle soa records without manual intervention. even having the "add option soa_edit_api" #40 it conflicts with custom SOA records.
if i only define a zone, i don't have to manually set the soa record.
but i cannot configure all soa fields and will end up with an invalid soa record:
if i add a custom soa recoard additionally to the zone
it will work in the first run but as i add A records i will get conflicting SOA records.
can anyone use powerdns with this provider without manual intervention? are only docs missing or does it simply not work?
as @ion1 commented #43 (comment) a special placeholder in the soa record like
<auto>
(@ion1 suggested0
) would help.an alternative would be to allow to set all SOA data with the
powerdns_zone
.today i also noticed that with the zone we set
soa_edit_api
which is forSOA-EDIT-DNSUPDATE
and notSOA-EDIT
as i asumed from #29 (which of course make sense, as it is the zone i set and not the server config)just to list the values from the powerdns docs here:
https://doc.powerdns.com/authoritative/dnssec/operational.html#possible-soa-edit-values
https://doc.powerdns.com/authoritative/dnsupdate.html#soa-edit-dnsupdate-settings
it would really make sense to improve the docs here but to improve the docs it would be required that one of the implementing devs describe what is the right way for handling this.
The text was updated successfully, but these errors were encountered: