Re: include order
Wouter Wijngaards <[email protected]> Wed, 25 Sep 2019 16:52:43 +0200
| Newsgroups | gmane.network.dns.nsd.general |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --===============2445967365397197555== Content-Type: multipart/alternative; boundary="------------D6FF5949221A4523ED04829A" Content-Language: en-US This is a multi-part message in MIME format. --------------D6FF5949221A4523ED04829A Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Hi Andreas, On 25/09/2019 14:15, Andreas Schwarz wrote: > Hi > > I am having a strange behavior when using the include directive with > globbing. Fixed in commit https://github.com/NLnetLabs/nsd/commit/4b81742f56297ec707cddf49e6192bdddb7e2fd9 Then the includes are in sorted order ascending. Also fixed Unbound that had the same issue. Thanks for the report, Best regards, Wouter > > The intention is, to have some "conf.d", where I have my configuration > files. The configuration files are prefixed with a number, e.g. > > 10-test.conf -> Content "foo" > 20-test.conf -> Content "bar" > > I would expect NSD to include the files in this order. However, > restarting the service or running nsd-checkconf tells me this: > > /etc/nsd/conf.d/20-test.conf:1: at 'bar': error: syntax error > read /etc/nsd/nsd.conf failed: 1 errors in configuration file > > I tried several other prefixes (number or letter). > It looks like the files are parsed in a somewhat arbitrary order. I > can reproduce this with the NSD packages from several distributions, > Debian 9, Debian 10, CentOS 7, Arch ... > > I found this line in the lexer > https://github.com/NLnetLabs/nsd/blob/master/configlexer.lex#L124 > which to me indicates, that a sorted/predictable outcome for including > files is desired and should work. > > Is this me doing something wrong? Can anyone else reproduce/explain > this behaviour? > > Best regards > Andreas > > _______________________________________________ > nsd-users mailing list > [email protected] > https://open.nlnetlabs.nl/mailman/listinfo/nsd-users --------------D6FF5949221A4523ED04829A Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body text="#000000" bgcolor="#FFFFFF"> <p>Hi Andreas,<br> </p> <div class="moz-cite-prefix">On 25/09/2019 14:15, Andreas Schwarz wrote:<br> </div> <blockquote type="cite" cite="mid:43-5d8b5a80-29-79ae3900@22911000"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> Hi<br> <br> I am having a strange behavior when using the include directive with globbing.<br> </blockquote> <p><br> </p> <p>Fixed in commit <a class="moz-txt-link-freetext" href="https://github.com/NLnetLabs/nsd/commit/4b81742f56297ec707cddf49e6192bdddb7e2fd9">https://github.com/NLnetLabs/nsd/commit/4b81742f56297ec707cddf49e6192bdddb7e2fd9</a></p> <p>Then the includes are in sorted order ascending. Also fixed Unbound that had the same issue.</p> <p>Thanks for the report,</p> <p>Best regards, Wouter<br> </p> <p><br> </p> <blockquote type="cite" cite="mid:43-5d8b5a80-29-79ae3900@22911000"><br> The intention is, to have some "conf.d", where I have my configuration files. The configuration files are prefixed with a number, e.g.<br> <br> 10-test.conf -> Content "foo"<br> 20-test.conf -> Content "bar"<br> <br> I would expect NSD to include the files in this order. However, restarting the service or running nsd-checkconf tells me this:<br> <br> /etc/nsd/conf.d/20-test.conf:1: at 'bar': error: syntax error<br> read /etc/nsd/nsd.conf failed: 1 errors in configuration file<br> <br> I tried several other prefixes (number or letter).<br> It looks like the files are parsed in a somewhat arbitrary order. I can reproduce this with the NSD packages from several distributions, Debian 9, Debian 10, CentOS 7, Arch ...<br> <br> I found this line in the lexer<br> <a class="moz-txt-link-freetext" href="https://github.com/NLnetLabs/nsd/blob/master/configlexer.lex#L124">https://github.com/NLnetLabs/nsd/blob/master/configlexer.lex#L124</a><br> which to me indicates, that a sorted/predictable outcome for including files is desired and should work.<br> <br> Is this me doing something wrong? Can anyone else reproduce/explain this behaviour?<br> <br> Best regards<br> Andreas <br> <fieldset class="mimeAttachmentHeader"></fieldset> <pre class="moz-quote-pre" wrap="">_______________________________________________ nsd-users mailing list <a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a> <a class="moz-txt-link-freetext" href="https://open.nlnetlabs.nl/mailman/listinfo/nsd-users">https://open.nlnetlabs.nl/mailman/listinfo/nsd-users</a> </pre> </blockquote> </body> </html> --------------D6FF5949221A4523ED04829A-- --===============2445967365397197555== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ nsd-users mailing list [email protected] https://open.nlnetlabs.nl/mailman/listinfo/nsd-users --===============2445967365397197555==--