[nsd-users] Can't get pattern substition to work

Lew Payne lew.payne at gmail.com
Sun Mar 9 20:24:05 UTC 2014


Will - The sole source of my zone data will be the nsd.conf file (as was
the case previously).  I will not be "importing" zones through
"nsd-control.  However, I still want to take advantage of patterns to
define a common set of keywords and values in my nsd.conf zone definitions,
thus avoiding lengthy repetitions.  The slides (from 16-OCT-2013) show the
use of patterns as "macro expansions" applied to "zone:" names within the
nsd.conf file.  That's what I want to do... and I've followed the exact
examples shown in the slides.  Again, the "patterns" work as long as I
don't use substitutions (%s, %x, %y, %z, etc).  Hence, I believe something
is quirky with the patterns.

It would be great if you could check, using the example I provided (or I
can zip up my working set).

Thanks!
Lew Payne


On Sun, Mar 9, 2014 at 12:55 PM, Will Pressly <will at edgecast.com> wrote:

> I am not around a machine where I can poke at your substitution problem,
> but, from what you are saying about not wanting to do addzone, have you
> looked at reconfig? Nsd-control reconfig will find diffs in sequential
> revisions in your nsd.conf file and just apply changes to the running state
> of the daemon. Eg: it will detect zones that are in a newer rev of the
> nsd.conf (that were absent in an earlier revision) and add them
> automatically. This works with deletes as well.
>
> This way your nsd.conf file is the sole source of config input for your
> daemon -- not nsd.conf and the zones.list file. This way you can just
> explicitly add the zone name and path to the zones section of your nsd.conf
> file without having to use patterns.
>
> I will try to look at your pattern substitution problem later -- I have a
> hunch, but do not want to suggest it here for fear of looking like a fool
> :) That said, I assume you looked at your logs and checked for chroot
> presence/relativization, right? Also, you might just try reconfig as I
> suspect that will better satisfy your work flow requirements.
>
> Regards,
> Will
> On Mar 9, 2014 11:25 AM, "Lew Payne" <lew.payne at gmail.com> wrote:
>
>>  I'm upgrading to nsd v4.0.1 (from a six year old release).  I've
>> crafted a new nsd.conf by hand, and would like to take advantage of the
>> "pattern" feature.  I've read the man page, looked at the sample conf file,
>> and even poured through the 16-OCT-2013 slide presentation.  My nsd.conf
>> conforms to the required standard, yet there seems to be a failure when
>> using substitution patterns.
>>
>> This fails...
>>
>> pattern:
>> ....name: "solozones"
>> ....zonefile: "zones/db.%s"
>> ....provide-xfr: 1.2.3.4 NOKEY
>>
>> zone:
>> ....name: "whatever.com"
>> ....include-pattern: "solozones"
>>
>> producing a "could not find pattern solozones" error.  I've also tried
>> using "zones/db.%y.%z" as well as "zones/db.\%s" as the zonefile pattern,
>> to no avail.  The problem seems to be in substitution (it would help if it
>> showed the substitution/expansion in the error output)... because the
>> following works:
>>
>> pattern:
>> ....name: "solozones"
>> ....zonefile: "zones/db.whatever.com"
>> ....provide-xfr: 1.2.3.4 NOKEY
>>
>> Can someone please tell me what I'm doing wrong, and how to work around
>> this problem?  I want to hard-code (lock down) the zones into nsd.conf,
>> rather than use nsd-control addzone (for PCI and HIPAA reasons).
>>
>> I hope someone brighter than me can spot why this isn't working.
>>
>>
>> _______________________________________________
>> nsd-users mailing list
>> nsd-users at NLnetLabs.nl
>> http://open.nlnetlabs.nl/mailman/listinfo/nsd-users
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nlnetlabs.nl/pipermail/nsd-users/attachments/20140309/339355ae/attachment.htm>


More information about the nsd-users mailing list