[syslog-ng] [Bug 191] New: glob-based includes aren't evaluated in proper order

bugzilla at bugzilla.balabit.com bugzilla at bugzilla.balabit.com
Sat Sep 1 12:23:23 CEST 2012


https://bugzilla.balabit.com/show_bug.cgi?id=191

           Summary: glob-based includes aren't evaluated in proper order
           Product: syslog-ng
           Version: 3.3.x
          Platform: All
        OS/Version: All
            Status: ASSIGNED
          Severity: normal
          Priority: unspecified
         Component: syslog-ng
        AssignedTo: algernon at balabit.hu
        ReportedBy: algernon at balabit.hu
Type of the Report: bug
   Estimated Hours: 0.0


While upgrading one of my trickier configs, I noticed that syslog-ng suddenly refused to start, saying it can't find the mongodb destination - this was clearly
bogus. A little research revealed the problem:

I had a setup where /etc/syslog-ng/syslog-ng.conf had an @include "/etc/syslog-ng/conf.d/" line prior to the upgrade, but when upgraded, that changed to
@include "/etc/syslog-ng/conf.d/*.conf". It turns out, that while syslog-ng loads the files in the correct order in both cases, when using globs, the include
stack gets botched up:


Starting to read include file; filename='/home/algernon/install/sng/3.3/etc/conf.d/00-mongodb.conf', depth='1'
Starting to read include file; filename='/home/algernon/install/sng/3.3/etc/conf.d/99-test.conf', depth='2'
Error parsing destination, destination plugin mongodb not found in /home/algernon/install/sng/3.3/etc/conf.d/99-test.conf at line 2, column 2:
                                                     included from /home/algernon/install/sng/3.3/etc/conf.d/00-mongodb.conf line 1, column 1
                                                     included from /home/algernon/install/sng/3.3/etc/syslog-ng.conf line 26, column 1

        mongodb();

00-mongodb.conf does NOT include 99-test.conf. syslog-ng.conf includes both with a glob include. But since it thinks 99-test.conf was included by
00-mongodb.conf, it did not evaluate the contents of the latter, and as such, the mongodb module did not get loaded, and then, of course, the 99-test.conf
which would use it, will fail with a parse error.

With a directory include, this does not happen.

A similar issue affects 3.4 too, but there plugin loading happens automatically, so this particular config would work. However, if a later config relies on a
former (eg, the former defines a block), then that would break too.


-- 
Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the syslog-ng mailing list