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

Template is not applied during domain creation #338

Closed
ptselios-inmarsat opened this issue Aug 22, 2018 · 7 comments
Closed

Template is not applied during domain creation #338

ptselios-inmarsat opened this issue Aug 22, 2018 · 7 comments

Comments

@ptselios-inmarsat
Copy link

I need some help to understand if this is a bug or something else in my configuration.
I deleted the preconfigured templates (directly from from the DB) and created a new one.
The template has only 3 records (1 SOA & 2 NS entries). The records are active (in the DB they have status "0").
However, when I create a new domain and I select the template the domain is created with only the SOA record provided by the PDNS and no NS records. It's like I haven't selected the template.

The History shows the domain creation, but the JSON is just for the domain, there are no records:

{
   account_id: "0",
   domain_type: "native",
   domain_master_ips: "None"
}

So, is this a bug? Do I misunderstood the usage of templates?

@paescuj
Copy link

paescuj commented Aug 22, 2018

I've experienced the same just a few days ago. In my case it was caused by a wrong mx record in the template (missing priority number).
Have you already taken a look at the pdns server logs? It should show a detailed error message.
In my case the powerdns-admin history had two entries:
Add domain <DomainName>
Applying template <TemplateName> to <DomainName>, FAILED to created records.

@ptselios-inmarsat
Copy link
Author

PDNS Logging is off since (in theory) it uses journal. But in the journal there are no errors (I need to find out how to log the API in the journald, but that's a different issue).

And yes, you are right, there was an error (a missing trailing dot) in the history, many thanks!

@paescuj
Copy link

paescuj commented Aug 24, 2018

Glad I could help you! For the future a dns record validation would be a great thing.

@T313C0mun1s7
Copy link

T313C0mun1s7 commented Oct 19, 2018

I am experiencing the same issue. I have several templates and none of them apply. I do not think I have any errors in the templates. I have several web servers, but stand alone DNS and Mail server, so the only real difference from template to template is the IP address in the apex domain A record and a wildcard A record. I'm not too worried about publishing the full zone here since a few DNS queries would basically provide the information anyhow. Here is my basic template with the IP address made generic.

*   A    Active  3600  xxx.xxx.xxx.xxx
@   CAA  Active  3600  0 iodef "mailto:hostmaster@shasta.com"
@   CAA  Active  3600  0 issue "comodoca.com"
@   CAA  Active  3600  0 issue "letsencrypt.org"
@   SOA  Active  3600  hostmaster.shasta.com 20160101000 10800 3600 604800 38400
@   A    Active  3600  xxx.xxx.xxx.xxx
@   TXT  Active  3600  "v=spf1 include:shastaemail.com -all"
@   MX   Active  3600  10 shastaemail.com.	
@   NS   Active  3600  isns1.shasta.com.	
@   NS   Active  3600  isns2.shasta.com.

It is the same symptoms as described above. If I select any of my templates from the drop down in the domain creation form, it creates the zone with no errors. However, when I go to the zone to look at it the only record created is the SOA.

@tmuncks
Copy link
Contributor

tmuncks commented Oct 19, 2018

Try to lose the SOA from the template - In my experience, that one can be tricky. That said, basic stuff works very well IMO.

screenshot from 2018-10-19 15-41-08
screenshot from 2018-10-19 15-41-24
screenshot from 2018-10-19 15-42-01

@T313C0mun1s7
Copy link

Deleting the SOA record was the fix in my case. That said, if templates don't work with an SOA record included, it brings up two other issues that need to be addressed.

  1. This leaves no way to template an alternate SOA to the default SOA specified in the PowerDNS config file, making the only option editing the SOA after the zone creation.
  2. If then Official systemd support #1 is considered acceptable, there should be no option to work with SOA records in the template interface at all.

@ngoduykhanh
Copy link
Contributor

There was rework to change the way of applying the record changes to PDNS API. It is applied for the Domain Template as well. I think the issue is not available anymore. So I am closing it

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

No branches or pull requests

5 participants