Fetching journal cursor in persistJournal could cause us to save
invalid cursor leading to duplicating messages further on, when new
WorkAroundJournalBug option is set we are saving it on each
readJournal() where we now that the state is good.
pollJournal() is now cleaner and faster, correctly handles INVALIDATE
status from journald and is able to continue polling after journal
flush. Also reduced POLL_TIMEOUT a bit as it caused rsyslog to exit
with error in corner cases for some ppc when left at full second.
re-factored imjournal CI tests with journal_print tool to have more
detailed error reporting
We already know they are currently unstable, so there is not point
in messing up CI result each time. The test will still be carried out
in nightly checks, so the problems won't be forgotten.
We run only some distcheck test that we cannot yet run inside
the containers on travis. This reduces the amount of redundant
work done, speeding up Travis runtime.
Any missing checks are still detected by buildbot part of CI.
by default, we now use 10s timeout for terminating inputs. On some
slow machines (CI under heavy load) the system default is not sufficient,
what can lead to memory leaks and thus valgrind failures.
When rsyslog shuts down and imfile is inside a change polling loop,
it does not properly free memory returned by glob(). This is a cosmetic
bug as the process terminates within the next few milliseconds. However,
it causes memory analyzer reports and thus makes CI fail.
The timeout could be reduced by mutex wait time, which was not the
intended behaviour and could lead the the input thread being
cancelled while it would have been perfectly legal to shut it down
cleanly.
Noticed during working on the CI system. May explain some testbench
instability and may have caused trouble with state files (not)
properly being written by inputs.
This is purely for debugging, and aimed at helping find some race
within the testbench. We know it happens, but it is unfortunately
totally unreproducible, so we try to gather data as less invasive
as possible.
In theory, this should work without the sleep, but in practice
this triggers some issues I could not yet diagnost. Reducing,
however, seems possible. This will lead to notable speedup of
testbench runs.
If libgcry.la is built later than lmcry_gcry.la, there is a failure:
[snip]
|../aarch64-wrs-linux-libtool --tag=CC --mode=link aarch64-wrs-linux-gcc
-o lmcry_gcry.la lmcry_gcry_la-lmcry_gcry.lo libgcry.la -lgcrypt
|aarch64-wrs-linux-libtool: error: cannot find the library 'libgcry.la'
or unhandled argument 'libgcry.la'
|Makefile:1049: recipe for target 'lmcry_gcry.la' failed
|make[2]: *** [lmcry_gcry.la] Error 1
[snip]
The LIBADD of lmcry_gcry.la contains libgcry.la, we should also add libgcry.la
to lmcry_gcry.la's DEPENDENCIES.
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
When mmkubernetes encounters a record with a CONTAINER_NAME field,
but the value does not match the rulebase, mmkubernetes returns
an error, and mmkubernetes does not do any further processing
of any records.
The fix is to check the return value of ln_normalize to see if
it is a "hard" error or a "does not match" error.
This also adds a test for pod names with dots in them.