<div dir="ltr"><div><div>In addition what Gergely just said, this seems to be a genuine bug in the system() source as it unconditionally uses newer features, even though the version you specified is older than that.<br><br></div>Too bad. the code for the system source is pretty inconvinient a fragile to modify, but anyway I wrote an untested patch that should solve this issue. However while trying I noticed it is not enough, SCL is pretty incompatible with early @version tags. With my 3.7 tree, we are using stuff like "template-function" declarations, which is again unsupported in old config versions. If stuff like python blocks appear in SCL include files, then the entire @version stuff would become futile if the config in question uses SCL.<br><br></div><div>I'm starting to think that new keywords shouldn't be considered identifiers even with old config versions, as that's the only thing preventing your configuration to work. In that case if someone used a keyword as an identifier would have a conflict, but that's probably less likely than an inoperable construct in SCL, and I don't want to put too much ifdef mockery into SCL itself.<br><br></div><div>Would you like to try this patch:<br><br><font face="monospace,monospace">$ git diff<br>diff --git a/lib/cfg-lexer.c b/lib/cfg-lexer.c<br>index 80d36f2..d0fd30c 100644<br>--- a/lib/cfg-lexer.c<br>+++ b/lib/cfg-lexer.c<br>@@ -195,7 +195,7 @@ cfg_lexer_lookup_keyword(CfgLexer *self, YYSTYPE *yylval, YYLTYPE *yylloc, const<br> if (token[j] == 0 && keywords[i].kw_name[j] == 0)<br> {<br> /* match */<br>- if (cfg_is_config_version_older(configuration, keywords[i].kw_req_version))<br>+ if (0 && cfg_is_config_version_older(configuration, keywords[i].kw_req_version))<br> {<br> msg_warning("WARNING: Your configuration uses a newly introduced reserved word as identifier, please use a different name or enclose it in quotes before upgrading",<br> evt_tag_str("keyword", keywords[i].kw_name),<br></font><br></div><div><br></div><div>Google may clobber the patch itself, but it simply disables the "too new keyword for this config version" check and lets syslog-ng process any new keywords (such as channel generated by system()).<br></div><div><br></div><div>The entire "too new keyword" used was added becauses SLES 11 used "null" as a destination name, which became reserved in 3.1-3.2 timeframe causing syntax errors in established configs. We might just add one such exception for the "null" keyword and be done with the generic check.<br><br></div><div>Any opinions?<br><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">-- <br>Bazsi<br></div></div></div>
<br><div class="gmail_quote">On Sat, Mar 7, 2015 at 12:49 AM, Dan Mahoney <span dir="ltr"><<a href="mailto:dmahoney@isc.org" target="_blank">dmahoney@isc.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey there,<br>
<br>
We have a number of systems that we're trying to deploy syslog-ng on, with<br>
puppet, which means we're dealing with multiple versions out there -- so<br>
we're trying to stay compatible with 3.4.<br>
<br>
On a newer version (3.6), we get the following errors on startup:<br>
<br>
(snip)<br>
<br>
[2015-03-06T20:47:33.065077] WARNING: Configuration file format is too<br>
old, syslog-ng is running in compatibility mode Please update it to use<br>
the syslog-ng 3.6 format at your time of convinience, compatibility mode<br>
can operate less efficiently in some cases. To upgrade the configuration,<br>
please review the warnings about incompatible changes printed by<br>
syslog-ng, and once completed change the @version header at the top of the<br>
configuration file.;<br>
[2015-03-06T20:47:33.096433] WARNING: Starting with syslog-ng 3.6, the<br>
system() source performs JSON parsing of messages starting with the<br>
'@cim:' prefix. No additional action is needed;<br>
[2015-03-06T20:47:33.096495] WARNING: Your configuration uses a newly<br>
introduced reserved word as identifier, please use a different name or<br>
enclose it in quotes before upgrading; keyword='channel',<br>
config-version='3.3', version='3.4', filename='source confgen system',<br>
line='1:1'<br>
Error parsing source, source plugin channel not found in source confgen<br>
system at line 1, column 1:<br>
included from<br>
/usr/local/etc/syslog-ng.conf line 27, column 9<br>
<br>
channel<br>
^^^^^^^<br>
<br>
(snip)<br>
<br>
I've found if I comment out the "system()" source it makes this error go<br>
away, but the requisiste lines are exactly what are referenced in the<br>
manual:<br>
<br>
<br>
source s_local {<br>
system();<br>
internal();<br>
};<br>
<br>
I suppose what's most confusing here, is syslog-ng is trying to tell me<br>
exactly where it finds the error, in the word "channel" saying "here,<br>
change this, this is the bad word I'm tripping over", but I don't find<br>
that word anywhere -- nor does it say *which* included file it's tripping<br>
over. Maybe it's telling me that's the word it *needs* to find, but<br>
that's less clear.<br>
<br>
I'm not finding anything in the mailing lists for this.<br>
<br>
Finally, I should probably ask -- since syslog-ng has the ability to tag<br>
your config files with a given version, is there a way to say "use this<br>
config if you're on 3.4 and this version if you're on 3.6", so I can stay<br>
compatible with the various versions I've got deployed.<br>
<br>
One other little nit: "Convenience"<br>
<span class="HOEnZb"><font color="#888888"><br>
-Dan Mahoney<br>
______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
</font></span></blockquote></div><br></div>