Jarno Huuskonen
2013-Oct-18 20:56 UTC
[nsd-users] nsd-4.0.0b5(and rc2) and changing zone from master to slave ?
Hi, I'm doing some quick tests with nsd-4.0.0b5 and (rc2). And found something strange when changing (nsd-control reconfig) one zone from: zone: name: 10.in-addr.arpa zonefile: /zones/empty.zone to zone: name: 10.in-addr.arpa request-xfr: 192.168.122.12 NOKEY allow-notify: 192.168.122.12 NOKEY zonefile: /zones/slave/10.rev and doing nsd-control reconfig. After reconfig nsd-control zonestatus still shows that the zone is still master: zone: 10.in-addr.arpa state: master But if I do nsd-control write, then nsd writes: [1382128657] nsd[13461]: info: new control connection from ::1 [1382128657] nsd[13461]: info: remote control connection authenticated [1382128657] nsd[13461]: info: control cmd: write [1382128657] nsd[13461]: info: remote control operation completed [1382128657] nsd[13504]: info: writing zone 10.in-addr.arpa to file /zones/slave/10.rev~ (the written file has same serial / records as the original master (empty.zone file)). Also after reconfig nsd accepts notifies from 192.168.122.12 [1382129263] nsd[13542]: info: notify for 10.in-addr.arpa. from 192.168.122.12 (but doesn't reload / update the zone). Is changing zones from master -> slave supposed to work like this ? (First commenting the master zone -> nsd-control reconfig -> adding same slave zone -> nsd-control reconfig works). -Jarno -- Jarno Huuskonen
Matthijs Mekking
2013-Oct-22 10:19 UTC
[nsd-users] nsd-4.0.0b5(and rc2) and changing zone from master to slave ?
Hi Jarno, First of all, thanks for doing these tests. On 10/18/2013 10:56 PM, Jarno Huuskonen wrote:> Hi, > > I'm doing some quick tests with nsd-4.0.0b5 and (rc2). And found > something strange when changing (nsd-control reconfig) one > zone from: > > zone: > name: 10.in-addr.arpa > zonefile: /zones/empty.zone > > to > > zone: > name: 10.in-addr.arpa > request-xfr: 192.168.122.12 NOKEY > allow-notify: 192.168.122.12 NOKEY > zonefile: /zones/slave/10.rev > > and doing nsd-control reconfig. > After reconfig nsd-control zonestatus still shows that > the zone is still master: > zone: 10.in-addr.arpa > state: master > > But if I do nsd-control write, then nsd writes: > [1382128657] nsd[13461]: info: new control connection from ::1 > [1382128657] nsd[13461]: info: remote control connection authenticated > [1382128657] nsd[13461]: info: control cmd: write > [1382128657] nsd[13461]: info: remote control operation completed > [1382128657] nsd[13504]: info: writing zone 10.in-addr.arpa to file > /zones/slave/10.rev~ > > (the written file has same serial / records as the original master > (empty.zone file)). > > Also after reconfig nsd accepts notifies from 192.168.122.12 > [1382129263] nsd[13542]: info: notify for 10.in-addr.arpa. from 192.168.122.12 > (but doesn't reload / update the zone). > > Is changing zones from master -> slave supposed to work like this ?It seems that when you update the pattern or zone options, nsd does not initialize the zone in the xfr daemon as a slave. It does get the new options, so that's why the zone accepts notifies. This is fixed in trunk, r4077.> (First commenting the master zone -> nsd-control reconfig -> adding > same slave zone -> nsd-control reconfig works).Yes, when explicitly removing the zone and then adding, this works. Best regards, Matthijs> > -Jarno >