Ticket #332 (closed defect: wontfix)

Opened 5 years ago

Last modified 4 years ago

--start-id not respected when --zone is passed and named.conf not used in zone2sql

Reported by: anon Owned by: peter
Priority: normal Milestone:
Component: component1 Version:
Severity: normal Keywords:


The sample command:

zone2sql --start-id=10 --zone=/var/cache/bind/test.ps.db

does not respect the --start-id option, and sets it to 0 !! this is not documented either, also their is a minor spelling mistake in the man page ( Use <id> as the forst domain_id generated (defaults to 0).) , i assume its "first".

running pdns-server on debian 5.0.4

relevant really old posts on the mailing list:


Change History

Changed 5 years ago by anon

after looking at the src code, in the function "callback", lastsoa_domain_id is static and initialized by -1 ! this is fine as long as the the first zone id passed is stored in dirty_hack_num and static value of lastsoa_domain_id is incremented accordingly, thus the correct value is used. but what happens when there is no previous zones/domains? which is the case of passing --zone on command line? the desired value is the start-id (which we default to zero), the code sets it to -1 to act as if this is a new zone in a series of zones (from the callback function perspective) it increments and starts at -1 ++, i belive here is the problem ! the value of lastsoa_domain_id initialisation should be start-id minus one , and outputting first soa should be triggered by doing so too (setting dirty_hack_num to start-id minus one) ... im not sure this is the exact meaning of code ... hope it helps!

Changed 4 years ago by anon

Changed 4 years ago by peter

  • owner changed from somebody to peter
  • status changed from new to assigned

--start-id has been obsoleted by autoincrement behaviour in all supported databases. I will remove start-id from zone2sql shortly.

Changed 4 years ago by ahu

  • status changed from assigned to closed
  • resolution set to wontfix

The --start-id feature is no longer supported in 3.0, so it should have been removed. It might come back later. Removed in 2387.

Note: See TracTickets for help on using tickets.