Ticket #218 (closed defect: fixed)
Default schema too short for valid DNS records, plus bad behavior when a record too long found
|Reported by:||anon||Owned by:||somebody|
We did some tests with a very long SOA record, and PowerDNS died and could not restart.
Jan 16 16:30:18 cory pdns: Initiating transfer of 'name' from remote '22.214.171.124:51014' Jan 16 16:30:18 cory pdns: gpgsql Connection succesful Jan 16 16:30:18 cory pdns: AXFR started for 'name', transaction started Jan 16 16:30:18 cory pdns: Communicator thread died because of error: PostgreSQL failed to execute command: ERROR: value too long for type character varying(255) Jan 16 16:30:18 cory pdns: gpgsql Connection succesful Jan 16 16:30:19 cory pdns: Our pdns instance exited with code 0 Jan 16 16:30:19 cory pdns: Respawning
After respawning PowerDNS did not answer any queries at all. :(
The problem was a very long SOA record. The record in question was an SOA like this:
. abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijj.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijj.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijj.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh. 11 300 604500 604800 600
I changed the schema to have 1023 instead of 255 characters for the "content" column in the "records" table, restarted PowerDNS, and now everything is happy.
So, there are two problems:
- The default schema should be tweaked to allow larger records. I don't know what the DNS maximum record size is, but clearly 255 is not enough.
- PowerDNS needs to handle this failure better. Preferably not restarting, but if so at least doing so without error.