rsyslog.conf: first load default modules, then third-party config
When we installed file /etc/rsyslog.d/03-ratelimits.conf:
$IMJournalStateFile imjournal.state
$IMJournalPersistStateInterval 1000
$IMJournalRatelimitInterval 1
$IMJournalRatelimitBurst 10000
rsyslog failed:
invalid or yet-unknown config file command 'IMJournalStateFile' - have you forgotten to load a module? [v8.2010.0 try https://www.rsyslog.com/e/3003 ]
invalid or yet-unknown config file command 'IMJournalPersistStateInterval' - have you forgotten to load a module? [v8.2010.0 try https://www.rsyslog.com/e/3003 ]
invalid or yet-unknown config file command 'IMJournalRatelimitInterval' - have you forgotten to load a module? [v8.2010.0 try https://www.rsyslog.com/e/3003 ]
invalid or yet-unknown config file command 'IMJournalRatelimitBurst' - have you forgotten to load a module? [v8.2010.0 try https://www.rsyslog.com/e/3003 ]
That's because imjournal was loaded later than that config file. If
module was explicitly loaded via '$ModLoad imjournal' in our third-party
file, we got a different error:
module 'imjournal' already in this config, cannot be added [v8.2010.0 try https://www.rsyslog.com/e/2221 ]
When the config file is reordered like this, no errors are shown.
Resolves: rhbz#1985202