`pdnssec rectify-zone domain` fails if a entry in the records table has an empty ttl field #432

Closed
Habbie opened this Issue Apr 26, 2013 · 2 comments

Projects

None yet

1 participant

@Habbie
Member
Habbie commented Apr 26, 2013

~ # pdnssec rectify-zone domain.name
Error: Undefined but needed argument: 'default-ttl'

This occurs, when a ttl field of the domain entry is empty, example:

pdns=# select * from domains;
id | name | master | last_check | type | notified_serial | account
----+--------------------+--------+------------+--------+-----------------+---------
4 | test4.ch | | | NATIVE | |

pdns=# select * from records;
id | domain_id | name | type | content | ttl | prio | change_date | ordername | auth
----+-----------+--------------------+------+---------------------------------------------------------------------------+------+------+-------------+-----------+------
28 | 4 | test4.ch | SOA | ns01.test4.ch mail.test4.ch 2012036501 86400 7200 3600000 3600 | 3600 | | | | t
31 | 4 | | NS | ns01 | | | | |

As the ttl field is optional (imho, as the file dnssec.schema.pgsql.sql does not change the field's modifiers), this behavior is unwanted and the error message is misleading - this costed me hours to figure it out!

System details: Gentoo Linux, x86_64, PowerDNS 3.0.1, PostgreSQL 9.0.

@Habbie Habbie was assigned Apr 26, 2013
@Habbie Habbie closed this Apr 26, 2013
@Habbie
Member
Habbie commented Apr 26, 2013

Author: anon
Sorry but the tables looks horrible. Second try:

pdns=# select * from domains;
||id|name|master|last_check|type|notified_serial|account||
||4|test4.ch|||NATIVE||||

pdns=# select * from records;
||id|domain_id|name|type|content|ttl|prio|change_date|ordername|auth||
||28|4|test4.ch|SOA|ns01.test4.ch mail.test4.ch 2012036501 86400 7200 3600000 3600|3600||||t||
||31|4||NS|ns01|||||||

@Habbie
Member
Habbie commented Apr 26, 2013

Author: peter
Fixed in SVN r2266. Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment