1748 Commits

Author SHA1 Message Date
Rainer Gerhards
e551642316 testbench: add missing shebangs
detected by shellcheck
2018-10-01 12:00:31 +02:00
Rainer Gerhards
82d90c3dc6
Merge pull request #3095 from rgerhards/tb-keyfile
QA: add test for queue.cry.keyfile parameter
2018-10-01 10:42:03 +02:00
Rainer Gerhards
2e05168275
Merge pull request #3096 from rgerhards/tb-diag-backticks
cleanup: replace legacy bash backticks by current $() syntax
2018-10-01 09:31:33 +02:00
Rainer Gerhards
dabc8628b4
Merge pull request #3089 from rgerhards/tb-timeout
testbench: improve shutdown timeout diagnostics
2018-10-01 08:19:21 +02:00
Rainer Gerhards
2e1d2de2fc
fix bug in my previous commit
as the kafka tests failed so frequently, I overlooked that I
actually broken one...
2018-09-30 23:05:28 +02:00
Rainer Gerhards
70f85d2fed
cleanup: replace legacy bash backticks by current $() syntax
no functional changes
2018-09-30 19:17:27 +02:00
Rainer Gerhards
d2057ba36e
QA: add test for queue.cry.keyfile parameter 2018-09-30 19:12:08 +02:00
Rainer Gerhards
f4883fb2d9
testbench: improve shutdown timeout diagnostics 2018-09-30 19:04:38 +02:00
Rainer Gerhards
95a2d4043c
Merge pull request #3090 from rgerhards/tb-kafka-broker
testbench: detect kafka broker failure and skip test if so
2018-09-30 11:30:53 +02:00
Rainer Gerhards
650ec84c56
testbench: detect kafka broker failure and skip test if so
Nothing in our code has to do with the failure...

see also https://github.com/rsyslog/rsyslog/issues/3088
2018-09-30 08:55:15 +02:00
Rainer Gerhards
17ca039b44
clenup: useless use of cat (cosmetic) 2018-09-28 21:17:52 +02:00
Rainer Gerhards
9dead7c040
Merge pull request #3081 from rgerhards/i2575
bugfix queue subsystem: DA queue did ignore encryption settings
2018-09-28 17:54:51 +02:00
Rainer Gerhards
e01e74dcc9
bugfix queue subsystem: DA queue did ignore encryption settings
This commit fixes the bug and adds a new test to check the functionality.

closes https://github.com/rsyslog/rsyslog/issues/3066
closes https://github.com/rsyslog/rsyslog/issues/2575
2018-09-28 14:09:13 +02:00
Rainer Gerhards
8cbeb6305c
testbench: add test for encrypted disk queue
see also https://github.com/rsyslog/rsyslog/issues/3066
2018-09-28 11:24:04 +02:00
Rainer Gerhards
1bed4c986d
Merge pull request #3079 from rgerhards/tb-expected
testbench: work around shellcheck false positive
2018-09-28 10:27:07 +02:00
Rainer Gerhards
73e8182b24
testbench: modernize shutdown_immediate command 2018-09-28 10:10:32 +02:00
Rainer Gerhards
dc93feee72
testbench: work around shellcheck false positive
shellcheck does not do deep inspection and so does not see that
we use the EXPECTED variable. Let's help it understand this is
valid. This doesn't really cost us something, but it helps us
enforce useful policies (in many other cases this may be a valid
error indication).
2018-09-28 08:11:37 +02:00
Rainer Gerhards
25749144ed
Merge pull request #3078 from rgerhards/tb-pipeopt
testbench: remove useless "cat" command (cosmetic)
2018-09-27 19:10:19 +02:00
Rainer Gerhards
0e3dfd5520
Merge pull request #3077 from rgerhards/i3064
testbench: re-enable test sndrcv_relp_dflt_pt.sh
2018-09-27 19:09:21 +02:00
Rainer Gerhards
91ca47774b Merge remote-tracking branch 'al/imfile-testbench-issues2' into tmp 2018-09-27 19:02:42 +02:00
Rainer Gerhards
e929ee7220
Merge pull request #3051 from rgerhards/i1605
bugfix imfile: file change was not reliably detected
2018-09-27 16:03:58 +02:00
Rainer Gerhards
cffc60b416
testbench: remove useless "cat" command (cosmetic) 2018-09-27 12:06:20 +02:00
Rainer Gerhards
d6be99a85f
testbench: re-enable test sndrcv_relp_dflt_pt.sh
Test was originally only executed when root tests were enabled,
which routinely was not the case. There was not even a hard reason
to handle it that way. Also, the test had a couple of defects which
have also been fixed.

closes https://github.com/rsyslog/rsyslog/issues/3064
2018-09-27 11:57:47 +02:00
Rainer Gerhards
98b03eec68
Merge pull request #3061 from jgerhards/omsmpTest
testbench: add simple omsnmp test
2018-09-27 11:51:43 +02:00
Rainer Gerhards
f85ef7aabc
bugfix imfile: file change was not reliably detected
A change in the inode was not detected under all circumstances,
most importantly not in some logrotate cases.

Includes new tests made by Andre Lorbach. They now use the
logrotate tool natively to reproduce the issue.
2018-09-27 10:00:57 +02:00
Jan Gerhards
3fc7a66855 testbench: add simple omsnmp test
currently only checks if module is loaded and checks for
required parameters correctly
2018-09-27 09:03:28 +02:00
Rainer Gerhards
ca7c2db21a
Merge pull request #3062 from rgerhards/disable-kafka
testbench: skip sndrcv_kafka.sh as it fails quite frequently
2018-09-26 21:54:37 +02:00
Rainer Gerhards
cfc89b5198
Merge pull request #3054 from rgerhards/ci-cleanup-kafka
CI: clean hanging kafka and zookeeper instances on test startup
2018-09-26 10:57:16 +02:00
Rainer Gerhards
de8a51d745
Merge pull request #3059 from rgerhards/i3057
testbench: restart kafka if brokers do not come up
2018-09-26 10:46:44 +02:00
Rainer Gerhards
be88295442
testbench: skip sndrcv_kafka.sh as it fails quite frequently
see also https://github.com/rsyslog/rsyslog/issues/3057
2018-09-26 10:45:35 +02:00
Rainer Gerhards
5e11cecb3b
testbench: restart kafka if brokers do not come up
kafka tests are plagued by brokers failing to start, which then causes
(false positive) test failures.

We now to detect missing brokers, and do a kafka/zookeepr shutdown and
restart in this case. If that fails again, let's skip the test instead
of failing it - after all, it's not the issue of the to-be-checked code.

see also https://github.com/rsyslog/rsyslog/issues/3057
2018-09-26 08:41:41 +02:00
Jan Gerhards
94a0e7599d testbench: add very basic ommail test
not a very good test at the moment, but still better than none at all.
2018-09-25 17:54:21 +02:00
Rainer Gerhards
78677e8bb0
CI: clean hanging kafka and zookeeper instances on test startup 2018-09-24 17:22:58 +02:00
44306daf7d testbench: moved testbench init to top
Added full filecheck back to imfile-wildcard check but presorted
2018-09-24 15:11:02 +02:00
2abaf732f5 testbench: Fixed timing issues in some imfile wildcard/regex tests
Added touch command in all imfile wildcard tests which should make sure
directories exist before files are created in it.

Changed content checking in some tests by using "content_check_with_count"
instead of sleeptimes.
2018-09-24 15:11:02 +02:00
Rainer Gerhards
0c9574d8fe
bugfix testbench: kafka test startup was racy
Topic creation was racy: it can happen that the brokers have not
been synced.  This causes follow-on errors and ultimately causes
the test to hang in rsyslog shutdown.

This PR introduces a method to ensure the brokers are acutally
up and running before the rest of the test is carried out. I
assume this fixes the problems we have seen. However, only
practice will show if this really is the case because the
problem happened relatively infrequently (so a couple of good
tests do not necessarily indicate "problem solved").

As such, we close the issue with this commit, but may need
to re-open it if the issue is seen again.

closes https://github.com/rsyslog/rsyslog/issues/3045
2018-09-23 10:54:53 +02:00
Rainer Gerhards
7a7cdc434d
fix trailing whitespace in Python files 2018-09-23 08:51:30 +02:00
Rainer Gerhards
c2578645a3
Merge pull request #3047 from rgerhards/kafka-test-bug
testbench: small test refactor; add pluming to find test bug
2018-09-22 21:03:40 +02:00
Rainer Gerhards
3f3fcd3564
Merge pull request #3036 from rgerhards/imfile-truncate2
imfile: improve truncation detection
2018-09-22 17:39:43 +02:00
Rainer Gerhards
5bc086c292
testbench: small test refactor; add pluming to find test bug
see also https://github.com/rsyslog/rsyslog/issues/3045
2018-09-22 17:37:53 +02:00
Rainer Gerhards
8c7718d34f testbench: try to reproduce imfile "file no longer monitored" error
see also https://github.com/rsyslog/rsyslog/issues/1605
2018-09-22 15:52:57 +02:00
Rainer Gerhards
c1fd554cb6
Merge pull request #3042 from rgerhards/regr-gcov
testbench: fix recent regression in helgrind tests
2018-09-22 13:22:39 +02:00
Rainer Gerhards
da22c531be
Merge pull request #3038 from jsiwrk/testbench/omprog_test_fix
testbench: fix incompatibility of one omprog test with Python3
2018-09-22 11:17:06 +02:00
Rainer Gerhards
2280f25ab1
testbench: fix recent regression in helgrind tests
path info missing, unfortunately undetected when merging
8c38d3647fbf19111fb52ef1fc2c4c8d5f29a023
2018-09-22 10:33:43 +02:00
Rainer Gerhards
8c38d3647f
CI: add valgrind suppressions for -coverage gcc option
These suppressions are always used, as they can never be caused by
actual program code. So it doesn't hurt to always use them.

Also add some support for CodeCov tool.
2018-09-21 18:34:38 +02:00
Joan Sala
0b0a1262f2 testbench: fix incompatibility of one omprog test with Python3
Python3 writes to stderr immediately, and this caused the
captured output to differ with respect to Python2. Simplified
the test to do a single write to stderr. Also a cast to int
was needed when calculating 'numRepeats'.

closes #3030
2018-09-20 23:52:16 +02:00
b08a8e2b51 testbench: Kafka plumbing
- Removed all sleeps where possible.
- Moved all kafka start/stop/download logic into functions.
- Moved kafka/zookeeper stop into error_exit and exit_test.
- Kafka/Zookeeper cleanup only done on success now.
- Kafka/Zookeeper logfiles automatically dumped on error_exit only now.
- Added cleanup for Kafka/Zookeeper instances into CI/buildbot_cleanup.sh
2018-09-19 09:14:42 +02:00
Rainer Gerhards
2e56dc7822
Merge pull request #2962 from richm/mmkubernetes-issue-2949
mmkubertnetes: action fails preparation cycle if kubernetes API destroys resource during bootup sequence
2018-09-17 13:24:19 +02:00
Rich Megginson
3987cd929d mmkubertnetes: action fails preparation cycle if kubernetes API destroys resource during bootup sequence
The plugin was not handling 404 Not Found correctly when looking
up pods and namespaces.  In this case, we assume the pod/namespace
was deleted, annotate the record with whatever metadata we have,
and cache the fact that the pod/namespace is missing so we don't
attempt to look it up again.
In addition, the plugin was not handling error 429 Busy correctly.
In this case, it should also annotate the record with whatever
metadata it has, and _not_ cache anything.  By default the plugin
will retry every 5 seconds to connect to Kubernetes.  This
behavior is controlled by the new config param `busyretryinterval`.
This commit also adds impstats counters so that admins can
view the state of the plugin to see if the lookups are working
or are returning errors.  The stats are reported per-instance
or per-action to facilitate using multiple different actions
for different Kubernetes servers.
This commit also adds support for client cert auth to
Kubernetes via the two new config params `tls.mycert` and
`tls.myprivkey`.
2018-09-14 12:42:06 -06:00
Rainer Gerhards
faa28ed7ae
Merge pull request #2959 from PascalWithopf/relp-certvalid
omrelp: permit new authmode certvalid
2018-09-14 17:58:06 +02:00