[Pdns-users] Testing mydns backend
cyclops at prof-x.net
Fri Nov 2 08:07:41 UTC 2012
Peter van Dijk has recently asked us to test uncommon backends. The mydnsbackend is one of those. A number of pdns-users responded that they actually use that backend. Those few responses made me add the mydnsbackend to the (awesome) PowerDNS test-suite that exists in the source tree. To make the mydnsbackend work, i had to make some changed on which i'd like some feedback.
1) Zone2sql now has a mydns mode. In general, i'd like some feedback on this change although i think for most, it is not useful as they already have their data in the database. Zone2sql is used to convert the bind-zones to sql statements for the mydns database.
2) I've used the schema that's supplied with the powerdns source (http://wiki.powerdns.com/trac/browser/trunk/pdns/modules/mydnsbackend/schema.sql). To import all the records correctly, i had to change the unique key on the rr table to include the aux field. This is needed because one of the test domains has a SRV record with the same (r)data/content, except for the priority. As (like with gmysql) MyDNS stores prio in a seperate field (aux), this needed to become part of the unique key. It seems that MyDNS itself does not have any issues with this and operates fine with this new schema. I'd like to know if people have any comments on the schema itself and the change.
3) The very-long-txt test that we have is ignored because the schema only has 128 characters. I'm wondering if there are users who have changed the default schema to suport more than 128 characters and if we should do the same.
4) MyDNS uses the zone's minimum ttl (from the soa table) as a minimum for every record. If the rr ttl is lower than the zone's minimum ttl, it will raise it to the zone's minimum ttl. This is how MyDNS responds and it was also the same with the mydnsbackend. This seems to be the incorrect behaviour and would also break nearly every test in the test-set. I've added an option to the mydnsbackend to specify if it should use this minimal ttl or not. For the test-run, it is disabled as that's what powerdns expects. The default is what the backend did before and how MyDNS itself responds. I'd like some feedback on this as well.
All changes can be found on my github branch at https://github.com/cyclops1982/powerdns/tree/mydns. Changes can be viewed at https://github.com/cyclops1982/powerdns/compare/master...mydns.
Please note that i try to keep this branch up-to-date with Peter's master branch, but it might be unstable or a little behind on SVN.
Any feedback is welcome!
More information about the Pdns-users