• Welcome to The Network People Support Forums. Please login or sign up.

Can't add NS delegation records in parent zone: "conflicts with existing zone"

Started by adam.dorsey, September 18, 2013, 03:45:26 am

Previous topic - Next topic

adam.dorsey

I'm attempting to add subzone NS records, in the parent zone that I administer, referencing a subzone that I also administer.  Both zones are in the same NicTool instance.  My zones are something like:

zone.com
sub.zone.com
other.zone.com

Whenever I attempt to add an NS record for sub.zone.com to zone.com, I get an error like the following:
Cannot create/edit Record 'sub' in zone 'zone.com': it conflicts with existing zone 'sub.zone.com'.

Unfortunately, these records are being required by the upstream DNS provider that is replicating my data. 

Is this behavior a bug in NicTool or is it expected?

matt

This is expected behavior. Just as if you were configuring DNS using BIND zone files, all the DNS records for a particular zone belong within *that* zone file (or a parent, but not BOTH.)

In your example, the solution is easy. Don't put the NS records for sub.zone.com in zone.com, put them sub.zone.com. You can use the FQDN 'sub.zone.com', or the shortcut @ to enter them.

adam.dorsey

Quote from: matt on September 18, 2013, 03:52:51 am
This is expected behavior. Just as if you were configuring DNS using BIND zone files, all the DNS records for a particular zone belong within *that* zone file (or a parent, but not BOTH.)

In your example, the solution is easy. Don't put the NS records for sub.zone.com in zone.com, put them sub.zone.com. You can use the FQDN 'sub.zone.com', or the shortcut @ to enter them.


Matt,
Thanks for the fast answer.  Unfortunately now I have to convince the upstream admins (I work in a large organization) that they are wrong.  That's why I was somewhat hoping for a bug in this case  ;D

If they insist, I've found a relatively sane, if incredibly ugly, workaround that will let me enter the NS records and only the NS records in this manner.  This is in NicToolServer/Zone/Record/Sanity.pm:


# diff -Naur Sanity.pm.orig Sanity.pm
--- Sanity.pm.orig 2013-09-18 16:37:37.000000000 +0000
+++ Sanity.pm 2013-09-18 17:13:19.000000000 +0000
@@ -120,7 +120,7 @@
     while ( my $name = pop(@tocheck) ) {

         #warn "checking if exists $name";
-        if ( $self->zone_exists( $name, 0 ) ) {
+        if ( $self->zone_exists( $name, 0 ) && $data->{type} ne 'NS' ) {
             $self->error( 'name',
                 "Cannot create/edit Record '$data->{name}' in zone '$z->{zone}': it conflicts with existing zone '$name'."
             );


Posting it in case it helps someone else.