[ADD TO DNS DOMAIN] Virtualmin doesn't know how to merge domains

Set up a template containing a full DNS zone definition (SOA, A records, etc.)

Create a virtserver (A) and enable "create DNS zone" (such as example.com)

Create a subdomain-server (B) under virtserver (A) and tell it to use A's DNS zone (such as placing foo.example.com's records inside the example.com zone)

Bam - clash. Complains that there is already a SOA record in the zone.

Solution: When adding a domain to an existing zone, skip the SOA record definition, $TTL, and so on.

Btw, I am not advocating merging zones (I don't do it myself, it's too messy), but I discovered this bug and reported it since SOMEONE out there may want to merge zones.

Status: 
Active

Comments

What is the exact error you are getting? Virtualmin should just add records to the parent domain, although not the SOA or TTL.

I'm a little unclear on exactly how this merging is being done.

Something like "The target DNS zone already has a SOA record" (this is from memory)

My template both for the main server and sub-server is the same. A complex record with $TTL, SOA, nameservers, A/TXT/MX records for all kinds of services, etc.

It doesn't like the idea of merging that data into the existing zone, and barfs instead. ;)

Ok, I see the bug here ... will update this ticket when it is fixed.

Actually, I can't see how this could be going wrong. If you have a completely custom set of DNS records, they will never get added to the parent zone - only to a separate zone file.