omrelp for some time limited authentication modes to those
that were known. While this was OK, it prevented the easy
introduction of new auth modes into librel.
This has now been changed; omrelp now checks the validity of
the authmode directly via librelp by doing some librelp calls
upon processing the configuration.
Also, some tests have been updated to check this feature and
also ensure that the new librelp mode "certvalid" works
(if it is available).
* imkafka: implement multithreading support for kafka consumers.
Each consumer runs in it's own consumer thread now. New tests have also been
added for this.
- major memory leak which occurred once per message processed
So this could lead to OOM. Caused by improper free of json
structure
- another two major leaks of similar magnitued could occur if
"fromhost-ip" and/or "fromhost" properties were set
- minor leaks upon termination. these were unproblematic as
static and only occured immediately before shutdown.
But they triggered memory debugger errors.
- fixed test which did not check for mem leaks albeit it should
- core invalid handling of the "fromhost" property, if set via
the MsgSetPropsViaJSON() call. This was primarily of concern
for pmnormalize and mmexternal, and only if these properties
were used by either the rulebase or the external program
response.
Actually, most of the leaks go back to rsyslog core, but that
core functionality was not used by other modules in the same
way. But if some other would have used it, the effects would
have been the same (so be aware if you wrote custom modules).
imptcp open, failedopen, and closed pstats counters were assigned the wrong name, thus pstats
values did provide a totally wrong picture of what was going on.
This method currently has some race associated with it, also it is
really not required and the injectmsg method is superior.
Also fix imdiag's new $imdiagInjectDelayMode config directive. While
it was added, it was forgotten to actually apply the value.
We are not doing a separate commit as this is thightly coupled into
our testing here (which also as a side-effect tests the new imdiag
functionality).
This adds support for endmsg.regex. It is similar to
startmsg.regex except that it matches the line that denotes
the end of the message, rather than the start of the next message.
This is primarily for container log file use cases such as this:
date stdout P start of message
date stdout P middle of message
date stdout F end of message
The `F` means this is the line which contains the final part of
the message. The fully assembled message should be
`start of message middle of message end of message`.
`startmsg.regex="^[^ ]+ stdout F "` will match.
When rsyslog is not run as a service (under SRC control), HUP does not
awake the main loop timeout. In theory, it should do so, but in practice
this does not happen. As a work-around we now implement a kind of
ressource-saving busy waiting where we awake every half second to check
if HUP (or something else noteworthy) happened. This should not cause
any real issue in any case, because running rsyslog as a non-service
is very uncommon and probably only happens during testbench runs.
closes https://github.com/rsyslog/rsyslog/issues/2997