12655 Commits

Author SHA1 Message Date
Rainer Gerhards
a029820c58
Merge pull request #2898 from PascalWithopf/codestyle
correct codestyle in rsyslog part 2
2018-08-02 09:07:10 +02:00
PascalWithopf
c83e3ed216 correct codestyle in rsyslog part 2 2018-08-01 16:11:33 +02:00
Rainer Gerhards
8ea166d89d
testbench: fix some hardcoded names (#2895)
* testbench: fix some hardcoded names

This is prework to make parallel execution of tests possible.
2018-08-01 12:52:17 +02:00
Rainer Gerhards
801d78d289
Merge pull request #2897 from jvymazal/imjournal_leak
Fixed resource leak in persistJournalState()
2018-08-01 12:40:25 +02:00
Jiri Vymazal
0b3cb3401b Fixed resource leak in persistJournalState()
If fputs() failed we aborted without closing opened handle
2018-08-01 09:49:39 +02:00
Rainer Gerhards
2dfd9b5d2d
Merge pull request #2894 from rgerhards/sndrcv_tests
testbench: prototype of sndrcv test in modern style
2018-08-01 09:26:15 +02:00
Rainer Gerhards
653357fdaa
Merge pull request #2896 from friedl/test_refactor7
Test refactor part 7 - multi configs
2018-08-01 08:36:30 +02:00
Florian Riedl
ed89157982 Test refactor part 7 - multi configs 2018-07-31 15:52:50 +02:00
Rainer Gerhards
6bb5bc91f5
testbench: prototype of sndrcv test in modern style 2018-07-31 15:26:46 +02:00
Rainer Gerhards
6fdca3835c
maintain ChangeLog 2018-07-31 14:47:44 +02:00
Rainer Gerhards
cac7d3693f
Merge pull request #2543 from jvymazal/imjournal_rewrite
Fetching cursor on readJournal() and simplified pollJournal()
2018-07-31 14:44:08 +02:00
Rainer Gerhards
84efdcc122
Merge pull request #2889 from rgerhards/no-kafka-tests
Travis: temporarily disable kafka tests
2018-07-31 14:24:36 +02:00
Jiri Vymazal
59e58b5ec8 Fetching cursor on readJournal() and simplified pollJournal()
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
2018-07-31 12:08:25 +02:00
Rainer Gerhards
1f8f621a97
Merge pull request #2893 from PascalWithopf/codestyle
correct codestyle in rsyslog
2018-07-31 12:00:41 +02:00
Rainer Gerhards
f0ba3e2f21
maintain ChangeLog 2018-07-31 10:19:12 +02:00
Rainer Gerhards
aecb19bb5a
Merge pull request #2891 from rgerhards/imdiag-dynamic-port
testbench: make port for imdiag dynamic
2018-07-31 10:17:28 +02:00
PascalWithopf
19133327cc correct codestyle in rsyslog 2018-07-31 09:44:27 +02:00
Rainer Gerhards
6617e5c8a6
testbench: ensure test leaves no dangling listener instances
In case the test aborts. We utilize the timeout utility for now
to prevent this.
2018-07-31 08:33:08 +02:00
Rainer Gerhards
861751b24e
testbench: make port for imdiag dynamic 2018-07-30 19:34:25 +02:00
Rainer Gerhards
5a911c148d
Merge pull request #2892 from rgerhards/cleanup-nettester
testbench: cleanup no-longer needed "nettester" command
2018-07-30 17:51:14 +02:00
Rainer Gerhards
5a37ea4f1a testbench: cleanup no-longer needed "nettester" command 2018-07-30 15:20:59 +02:00
Rainer Gerhards
0bac6654c0 Travis: temporarily disable kafka tests
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.
2018-07-29 14:38:11 +02:00
Rainer Gerhards
8ff0b59b92
maintain ChangeLog 2018-07-29 12:37:35 +02:00
Rainer Gerhards
c99cdb4d44
Merge pull request #2849 from svvac/imrelp-bind-addr
imrelp: add support for seting address to bind to (#894)
2018-07-29 12:29:32 +02:00
Rainer Gerhards
255299e7b7
Merge pull request #2884 from rgerhards/faster-travis
travis: reduce runtime on "distcheck" commit
2018-07-28 14:25:57 +02:00
Rainer Gerhards
5e1bfa5f91
travis: reduce runtime on "distcheck" commit
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.
2018-07-28 13:00:08 +02:00
Rainer Gerhards
c75f4b0cf5
maintain ChangeLog 2018-07-27 11:59:25 +02:00
Rainer Gerhards
ce86c71d36
Merge pull request #2856 from rgerhards/i2855
core: do not abort startup on problems setting scheduling policy
2018-07-27 11:57:36 +02:00
Rainer Gerhards
bf9203dd80
Merge pull request #2875 from rgerhards/clang6
development tooling: do not hardcode clang to use for static analyzer…
2018-07-27 11:51:31 +02:00
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