12826 Commits

Author SHA1 Message Date
Rainer Gerhards
051a27c8b5
maintain ChangeLog 2018-07-27 11:27:20 +02:00
Rainer Gerhards
154eb8d397
Merge pull request #2865 from rgerhards/try-nosleep
experiment: remove sleep in shutdown_when_empty
2018-07-27 11:25:10 +02:00
Rainer Gerhards
8f5204327a
Merge pull request #2882 from hongxu-jia/master
fix race in parallel builds
2018-07-27 11:23:35 +02:00
Rainer Gerhards
9535835460
Merge pull request #2881 from richm/mmkubernetes-breaks-with-non-k8s-container-names
mmkubernetes: stops working with non-kubernetes container names
2018-07-27 11:22:17 +02:00
Rainer Gerhards
ea74974bb1 work around clang.6-0 static analyzer false positive 2018-07-27 09:18:26 +02:00
Rainer Gerhards
b572423733 testbench: fix some races on test termination
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.
2018-07-27 09:09:38 +02:00
Rainer Gerhards
5458f1ce6d bugfix imfile: memory leak upon shutdown (cosmetic)
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.
2018-07-27 09:09:38 +02:00
Rainer Gerhards
5c90771758 core bugfix: input shutdown timeout not properly applied
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.
2018-07-27 09:09:38 +02:00
Rainer Gerhards
e200b2192f add new global config parameter "inputs.timeout.shutdown" 2018-07-27 09:09:38 +02:00
Rainer Gerhards
aa4cd2a4da test instrumentation: emit message when thread is cancelled
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.
2018-07-27 09:09:38 +02:00
Rainer Gerhards
79754aa13b testbench: reduce sleep during shutdown processing
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.
2018-07-27 09:09:38 +02:00
Hongxu Jia
edce434db0 fix race in parallel builds
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>
2018-07-27 10:15:36 +08:00
Rich Megginson
fb4a41ca47 mmkubernetes: stops working with non-kubernetes container names
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.
2018-07-26 14:21:55 -06:00
Rainer Gerhards
c7935dfc1a
core/regex: fix potential NULL pointer assignment
regression from not yet release PR
https://github.com/rsyslog/rsyslog/pull/2786

see also https://github.com/rsyslog/rsyslog/pull/2786#issuecomment-408077339
2018-07-26 15:19:47 +02:00
Rainer Gerhards
d00bd86d43
omlibdbi: fix potential small memory leak
detected by clang static analyzer
2018-07-26 13:04:56 +02:00
Rainer Gerhards
c72de64804
work around clang 7 static analyzer report that we can't fix 2018-07-26 13:04:32 +02:00
Rainer Gerhards
5c7d6b9540 development tooling: do not hardcode clang to use for static analyzer run 2018-07-26 12:54:55 +02:00
Rainer Gerhards
863bee8a72
maintain ChangeLog 2018-07-26 11:58:28 +02:00
Rainer Gerhards
519d973be2
Merge pull request #2861 from rgerhards/errmsg
core: replace errmsg object calling conventions
2018-07-26 11:57:57 +02:00
Rainer Gerhards
6c696f521e
Merge pull request #2878 from rgerhards/fix-32bit
fix build issues on armhf systems
2018-07-26 11:56:24 +02:00
Rainer Gerhards
5c0f9ef989 fix build issues on armhf systems
Look like general 32 bit issues, though.
2018-07-26 07:59:46 +00:00
Rainer Gerhards
0f46713252
maintain ChangeLog 2018-07-26 09:23:47 +02:00
Rainer Gerhards
e96b7a8be0
Merge pull request #2876 from friedl/test_refactor6
Test refactor6
2018-07-26 09:18:14 +02:00
Rainer Gerhards
feb82be338
Merge pull request #2851 from jvymazal/imjournal_start
Added skip journal load on first run
2018-07-26 09:17:15 +02:00
Florian Riedl
e13dc61049 Test refactor part 6 2018-07-25 17:32:05 +02:00
Florian Riedl
6fbe23d4c9 Test refactor part 5 2018-07-25 13:42:52 +02:00
Rainer Gerhards
925fb718bb
maintain ChangeLog 2018-07-25 08:40:35 +02:00
Rainer Gerhards
e1522a1cfe
Merge pull request #2863 from rgerhards/no-default-tests
add --enable-default-tests ./configure option
2018-07-25 08:39:43 +02:00
Florian Riedl
61bec55a55 Test refactor part 4 2018-07-24 17:16:50 +02:00
Rainer Gerhards
c0ab9917b6
Merge pull request #2866 from friedl/test_refactor1
Test refactor part 1
2018-07-24 16:04:47 +02:00
Florian Riedl
c60449d09f Test refactor part 3.2 2018-07-24 16:02:15 +02:00
Jiri Vymazal
534d79344b Added skip journal load on first run
When starting rsyslog with imjournal for first time it outputs
an error and plugin does not run because no state file exists yet.
Now it skips the loading and creates state file on first persist.
Also fixed imjournal tests to actually test plugin functionality.
2018-07-24 15:40:54 +02:00
Rainer Gerhards
8a09659089
add --enable-default-tests ./configure option
This permits to control the "default tests" in testbench runs. These
are those tests that do not need a special configure option. There are
some situations where we really want to turn them of so that we can
run tests only for a specific component (e.g. ElasticSearch).

This commit also removes the --enable-testbench[12] configure switches,
which were introduced just to work-around travis runtime restrictions.
With the new CI setup and new options we could reduce the Travis runtime
dramatically and so we do not need them any longer.
2018-07-24 15:34:03 +02:00
Florian Riedl
e2432f6572 Test refactor part 3.1 2018-07-24 14:48:17 +02:00
Florian Riedl
aa0b3e4657 Test refactor part 2 2018-07-24 13:05:02 +02:00
Florian Riedl
68b6f3ac79 Test refactor part 1 2018-07-24 11:23:28 +02:00
Rainer Gerhards
c4ea54fe9a
Merge pull request #2860 from rgerhards/testbench-improve
Testbench improve
2018-07-23 19:41:15 +02:00
Rainer Gerhards
2ba3c8ddde
testbench: modernize testbench plumbing
changes some of the test commands to use bash functions
includes some small bug fixes to tests where bugs were
previously not seen due to different plumbing.
2018-07-23 17:26:34 +02:00
Rainer Gerhards
850b19091b
Merge pull request #2857 from jvymazal/k8s_null_check
Added NULL checks in mmkubernetes cache create
2018-07-23 14:26:30 +02:00
Rainer Gerhards
d6cf6949a9
Merge pull request #2858 from rgerhards/testbench-better-errmsg
testbench: kubernetes test cannot recover from failure
2018-07-22 15:02:21 +02:00
Rainer Gerhards
93fab573d3 bugfix testbench: test which requires inotify does not check it is available 2018-07-22 13:29:52 +02:00
Rainer Gerhards
ef901048dd
testbench: do not hang on mmkubernetes tests
also provide some more info on startup error
2018-07-22 13:27:23 +02:00
Rainer Gerhards
fff09ac94d
core: replace errmsg object calling conventions
old interface still needs to be removed to fully finish
refactoring of this component.

see also https://github.com/rsyslog/rsyslog/issues/1684
2018-07-21 17:47:29 +02:00
Jiri Vymazal
d2891faf3d Added NULL checks in mmkubernetes chache create 2018-07-20 15:37:09 +02:00
Simon Wachter
9e3552672d imrelp: add support for seting address to bind to (#894)
This adds a new optional `address` parameter to `imrelp` inputs in order
to specify an address to bind to.

Based on support added by rsyslog/librelp@96eb5be (rsyslog/librelp#90).
2018-07-20 15:00:52 +02:00
Rainer Gerhards
8dcae0eaa3
Merge pull request #2854 from rgerhards/chkseq
testbench: do not unnecessarily persist test data to disk
2018-07-20 14:50:59 +02:00
Rainer Gerhards
9ffb75fb18
core: do not abort startup on problems setting scheduling policy
rsyslog creates a default scheduling policy on startup. This code
invalidly used CHKiRet (our exception handler) to check pthreads
return codes, what this macro cannot do. This lead to hard to
diagnose startup problems in cases where there were problems
setting the scheduling defaults (e.g. when rsyslog is set to run
at idle priority). Even more so, this blocked startup altogether,
which is not the right thing to do. Actually, this can be considered
a regression from commit 7742b21. That commit was 8 years ago, so
in general this cannot be a big issues ;-)

The code now emits proper error messages (to stderr, as at this point
no other output is available as it is during the initial state of
rsyslog initialization) and continues the startup.

closes https://github.com/rsyslog/rsyslog/issues/2855
2018-07-20 10:21:12 +02:00
Rainer Gerhards
47e62c40f6
maintain ChangeLog 2018-07-20 08:56:52 +02:00
Rainer Gerhards
c8fe700d05
testbench: do not unnecessarily persist test data to disk 2018-07-20 08:55:03 +02:00
Rainer Gerhards
d0efa905e4
Merge pull request #2846 from rgerhards/gcc8-2
more gcc-8 induced corrections
2018-07-19 17:23:47 +02:00