rndc changezone

Klaus Darilion klaus.mailinglists at pernau.at
Wed Jul 9 12:40:33 UTC 2014

Hi Evan!

On 08.07.2014 23:05, Evan Hunt wrote:
> On Tue, Jul 08, 2014 at 10:14:43PM +0200, Klaus Darilion wrote:
>> The next question is, how to tell named that the zone has a new config. 
>> I reused the addzone code. addzone calls configure_zone(). The comment 
>> above configure_zone() says:
>>    "* Configure or reconfigure a zone."
>> Thus I thought I could just call this function and it will update the 
>> zone inside named, but I failed. The function exits with:
>>   named[22880]: none:1: zone 'test.at' already exists
>> Thus, can I reuse this function to update the zone? Actually is it 
>> possible to update the zone or do I have to delete and re-add it? How 
>> does "rndc reconfig" update the zone?
> configure_zone(), as currently written, is called by configure_view(),
> which creates a brand new view and populates it with zones.  When you're
> configuring for the first time, the zone objects are created; when you're
> doing a reconfig, they're copied over from the pre-existing view and
> reconfigured.  Either way, though, the view starts out empty, and finding
> that a zone was already there would mean that you'd specified the same
> zone more than once in named.conf.
> You're changing the assumptions now, so you'll need to be able to
> selectively disable that test.  (In fact, you need to reverse the sense of
> it: if you're editing zone configuration, the zone *must* exist.) I would
> suggest adding a new boolean parameter to configure_zone(), setting it to
> true when the zone is being edited within a running view, and false
> otherwise.

I have done that. Now, configure_zone() it fails while calling
ns_zone_configure() (which is quite big). AFAIK there are no debug log
messages inside this function. do you have any tips how to debug the
problem - where ns_zone_configure() exits?


More information about the bind-workers mailing list