Domain type in PowerDNS table.

Angelo Albanese

Hi all
as far as you know, is there any specific reason why the Director enforce the domain creation in Postgres/PowerDNS to be of "NATIVE" type ?

I'd like to use PowerDNS to notify a slave DNS factory (that consist of several BIND servers) and to update BINDs on each zone change/ record insert. I was able to do that manually changing the domain record to MASTER type in the DB. However the SEQUEL model enforce a check on the type NATIVE so when I deploy a new VM via bosh deploy I get an exception (see below). Personally I don't see any reason for that and code should limit the existence check to the domain name field only. Any insight is welcome.

D, [2015-10-01 15:04:26 #29455] [task:927] DEBUG -- DirectorJobRunner: (0.000840s) SELECT * FROM "domains" WHERE (("name" = 'microbosh') AND ("type" = 'NATIVE')) LIMIT 1
D, [2015-10-01 15:04:26 #29455] [task:927] DEBUG -- DirectorJobRunner: (0.000088s) BEGIN
E, [2015-10-01 15:04:26 #29455] [task:927] ERROR -- DirectorJobRunner: PG::Error: ERROR: duplicate key value violates unique constraint "domains_name_key"
DETAIL: Key (name)=(microbosh) already exists.: INSERT INTO "domains" ("name", "type") VALUES ('microbosh', 'NATIVE') RETURNING *
D, [2015-10-01 15:04:26 #29455] [task:927] DEBUG -- DirectorJobRunner: (0.000102s) ROLLBACK