428 Commits

Author SHA1 Message Date
Rainer Gerhards
58fcfc4909 testbench: work-around racy tests
some omprog tests are racy as they depend on sleep calls to "synchoronize".
We have mostly been able to change this to more reliable synchronization.
A small window of raciness remains for some tests, but this seem to be
inevitable. Tests on fully loaded systems seem to incidate that we have
solved the issue sufficiently.

If that doesn't solve the sporadic failures, we need to further think about
how to handle this.

see also https://github.com/rsyslog/rsyslog/issues/2403
2018-01-17 15:53:49 +01:00
Rainer Gerhards
76ef7a58b2 testbench: ensure we have the necessary commands to execute test
this might have caused sporadic failures on platform where "lsof" was
missing.

see also https://github.com/rsyslog/rsyslog/issues/2403
2018-01-17 13:30:46 +01:00
Rainer Gerhards
3e058ba9ea testbench: fix/upgrade diag.sh framework
fixed some obvious copy&paste error, removed invalid verboseness and
added a standard way of doing grep checks on test result
2018-01-17 11:44:52 +01:00
af09d33b49 imfile: Partially fixed issues not detecting files in directory when wildcards are used.
When directories and files are created at the same time,
imfile may missed subdirs or file if the machine is on high load.

The handling has been enhanced to scan newly created directories ALWAYS for
matching files.

This should fix following issues:
closes https://github.com/rsyslog/rsyslog/issues/2271

However we still have a problem when a multilevel directory configurations.
Details are discussed here https://github.com/rsyslog/rsyslog/issues/2354
2018-01-05 12:59:19 +01:00
Rainer Gerhards
31cc4355bd testbench: check if external URLs can be accessed, skip if not
They may not be accessible because they (or parts of the
network) can be down or access is not permitted. In this
case, the affected tests skip themselves.

Special thanks to Thomas D. (Whissi) for providing the check
function.

closes https://github.com/rsyslog/rsyslog/issues/2339
2018-01-03 17:25:12 +01:00
Rainer Gerhards
b83647fc97 testbench: try to provide minimal locaction info on aborts
While we try to keep the testbench output brief, we try to do a single
stacktrace if we find a core file.
2017-12-31 18:31:02 +01:00
Rainer Gerhards
02761dd0d8 testbench: clean up "normal" error message in kafka test plumbing
The error message regularly occurs if no kafka/zk instance is running,
which should be the case at start of test. However, the message
tends to make think reviewers that it is a real error. So we now
hide it.
2017-12-30 10:58:14 +01:00
Rainer Gerhards
ac209cd471 testbench: update and activate mmexternal test for invalid program
closes https://github.com/rsyslog/rsyslog/issues/1976
2017-12-20 15:58:25 +01:00
Rainer Gerhards
f23a1d3959 testbench: reduce startup timeout for tests
previous timeout caused very long runtime in cases where rsyslog
segfaulted on startup, which made the testbench failure harder to
diagnose than necessary.
2017-12-12 11:39:54 +01:00
7508010750 Basic Imfile FEN API support for Solaris (#2141)
imfile: Initial implementation of solaris FEN API (without wildcards)

FEN API is used to implement simular event based file
monitoring like with inotify.

This commit provides partial functionality. It supports event-driven
processing of files but does not yet provide wildcard functionality.
Wildscards will be provided by a later commit.

This can be committed as-is because the previous code did also
not provide wildcard support, so this is an improvement for
Solaris in any case.

see also https://github.com/rsyslog/rsyslog/issues/1954
2017-12-01 12:49:38 +01:00
Rainer Gerhards
dfe89f29e0
Merge pull request #2071 from rgerhards/es-testbench-additions
testbench: improvements in elasticsearch testing
2017-11-24 10:43:15 +01:00
Rainer Gerhards
cf425b2c36 testbench/omkafka: update valgrind test to more flexible test framework 2017-11-24 08:14:32 +01:00
Rainer Gerhards
61ccf4a159 testbench: improve elasticsearch test harness
see also https://github.com/rsyslog/rsyslog/issues/1989
2017-11-21 15:29:48 +01:00
8d1ffbf3c3 testsuite: Added es-basic-abort test to simulate elasticsearch shutdown/restart
Also changed start/stop method in diag.sh for elasticsearch
2017-11-21 15:28:15 +01:00
013c7304e9 testsuite: Added support to download, setup and start Elasticsearch from source
Works equal like for kafka and zookeeper. Elasticsearch is downloaded, configured and
started/stopped by the diag.sh script. Normal user access is sufficient.

Only es-basic.sh test has been adjusted with the new
method. Elasticsearch instance is limited to 128MB memory, should be sufficient for
the testbench.
2017-11-21 15:28:15 +01:00
Rainer Gerhards
1f859e7ad6 testbench/kafka: add valgrind test for kafka
Note: we need to add a supression file for a memory leak that looks
like it is caused by librdkafka.
See https://github.com/edenhill/librdkafka/issues/1536
for more details.

Once this issue is finally resolved, we should revisit the approach taken.

closes https://github.com/rsyslog/rsyslog/issues/2050
2017-11-21 13:12:29 +01:00
Rainer Gerhards
4b0f69d0ec testbench: check rsyslogd abort if tcpflood fails
this is useful if rsyslogd only abort in such tests - otherwise we
do not get a core analysis
2017-11-14 14:27:11 +01:00
Rainer Gerhards
2f76d61821 testbench: add threading correctness dynamic tests
utilizing the valgrind helgrind debugger

closes https://github.com/rsyslog/rsyslog/issues/1971
see also https://github.com/rsyslog/rsyslog/issues/2012
2017-11-10 19:03:01 +01:00
Rainer Gerhards
c13bbe60c0 testbench: update zookeeper version used in tests
unfortunately, there is no generic URL available...
2017-11-09 19:51:01 +01:00
Rainer Gerhards
1ca0f3d776 testbench: detect and report error download kafka dependency
make sure we are not puzzled when things go wrong.
2017-11-09 18:14:30 +01:00
Rainer Gerhards
39c3c4bd59 testbench: run gdb in batch mode, nicer diagnostic output 2017-11-08 11:27:19 +01:00
Rainer Gerhards
d49880b843 testbench: provide easier to read core dump analysis 2017-11-08 11:27:19 +01:00
Rainer Gerhards
c0b80d8756 testbench: harden tests against hanging previous instances
cleaning at exit does not always work because it sometimes is
not reached, especially in cases that go really wrong
2017-10-17 10:27:48 +02:00
Rainer Gerhards
6af7996d8b testbench: add (commented-out) troubleshooting support for solaris 2017-10-15 10:59:21 +02:00
Rainer Gerhards
fffbcc2ddc Merge pull request #1758 from rgerhards/pr-1633
implement fileoffset metadata
2017-09-12 08:54:09 +02:00
Rainer Gerhards
960bb25902 testbench: download kafka in quiet mode
... otherwise the testbench log is spammed by wget status display.
2017-09-11 12:53:10 +02:00
ab8e59657c testbench: Updated kafka server version from 0.9.0.1 to 0.10.2.1 2017-09-11 10:57:46 +02:00
e5d48d89c0 testbench: Added support to dump kafka / zookeeper server logs on test failure 2017-09-11 10:17:12 +02:00
Rainer Gerhards
0858209381 imfile: adjust offset metadata to give begin offset of file 2017-09-07 17:08:21 +02:00
Rainer Gerhards
090f105e9d testbench: improve queue test diagnostics
this is a bit more verbose, but helps greatly when diagnosing
queue file related issues

closes https://github.com/rsyslog/rsyslog/issues/170 (kind of...)
2017-09-07 09:26:56 +02:00
Rainer Gerhards
025ed2a933 impstats bugfix: impstats does not handle HUP
If the parameter "log.file" is specified, impstats writes its own
log file. However, HUP is not handled for this file, which makes
the functionality unusable with log rotation. It is also counter-
intuitive for users.

This patch enables correct HUP processing. As a sideline, it also
introduces a generic HUP processing framework for non-action type
of loadable modules.

closes https://github.com/rsyslog/rsyslog/issues/1662
closes https://github.com/rsyslog/rsyslog/issues/1663
2017-07-20 14:22:19 +02:00
8ecf0aeb34 kafka: Added option enable static linking of librdkafa (disabled by default).
Also saving failed msgs now when kafka produce fails. No message loss should
be possible anymore.

Also removed old kafka tests and readded new kafka tests.
If kafka instances cannot be started (happens from time to time when
kafka/zookepper sync fails), tests will be skipped instead of failing.

Closes https://github.com/rsyslog/rsyslog/issues/1559
Closes https://github.com/rsyslog/rsyslog/issues/1584
Closes https://github.com/rsyslog/rsyslog/issues/1515
May fix https://github.com/rsyslog/rsyslog/issues/1230
Closes https://github.com/rsyslog/rsyslog/issues/1052
2017-06-19 17:14:35 +02:00
b71c1871d0 omkafka: Added new options to save and load failed messages.
When enabled, failed messages are kept in memory queue and saved on
shutdown and loaded on startup. This prevents message loss of failed
messages.

The failed items are saved in a simple Linked List and automatically
being reprocessed on resume or doaction.

Load/Save logik implemented.

This should also remove the last possible message loss from issue:
https://github.com/rsyslog/rsyslog/issues/1052
2017-06-08 15:35:45 +02:00
702df5eed6 omkafka: Implemented newer delivery callback from librdkafka.
This somehow elimitated a lot of failing messages which were not
processed on shutdown (flush) before. The old callback API was
depreceated.

This should also elimitate most of the message loss when
kafka queue is full from issue:
https://github.com/rsyslog/rsyslog/issues/1052

The new code was tested with
queue.buffering.max.messages=100 and 2000 injected messages.

Testbench: Try starting kafka server second time if failed on
first try. Sometimes the broker is still registered in zookeeper.
2017-06-08 15:35:45 +02:00
732d0e21a7 omkafka: Enhanced support to detect kafka broker problems.
Also fixed tryresume and doAction handling when action is
in suspend state.

Calling for Callbacks more often.

Adjusted kafka fail test settings.

diag.sh script detects of kafka server comes up proberly

Added liblz4 to dependencies for omkafka/imkafka needed
for static linking.

This addresses the omkafka queue problem from issue:
https://github.com/rsyslog/rsyslog/issues/1052
Yet it does not fully solve the message problem yet,
but I am working on this.
2017-06-08 15:35:45 +02:00
Rainer Gerhards
8a5a62fd5c testbench: cleanup & move kafka test to new style config 2017-05-31 13:43:05 +02:00
Rainer Gerhards
0407bc8276 mmdblookup bugfix: multiple memory leaks
There were multiple large memory leaks in mmdblookup, which made
it unusable when used more than lightly.

closes https://github.com/rsyslog/rsyslog/issues/1415
2017-05-19 17:26:22 +02:00
Rainer Gerhards
a744313570 Merge pull request #1558 from alorbach/kafka-extension
imkafka input module extension
2017-05-12 15:20:32 +02:00
Pascal Withopf
8a84f775d5 imkafka: add new parameter confParam (#1)
testbench: Fixed testbench settings for new imkafka/omkafka tests
2017-05-11 14:05:38 +02:00
Rainer Gerhards
397ae67d8d testbench: add test for internal message processing memleak
also does some required changes to the test plumbing
2017-05-10 12:43:45 +02:00
7cba5f8128 testbench: Changed kafka server properties for propper multi setup
These changes are required for future testcases.
2017-05-10 09:27:31 +02:00
f5438bdea2 imkafka: Initial version if imkafka added
Basic features need to be added now.

testbench: Added kafka test with multi kafka instances

All kafka instances are connected to one zookeeper instance.
Diag script has been adjusted to propper start/stop single
kafka instances.

autotools: Added version check for librdkafka to be higher than 0.9.1
2017-05-09 11:15:20 +02:00
Rainer Gerhards
0d35f40356 testbench: reduce kafka test verbosity
(squash) enhance kafka test
2017-05-09 11:14:42 +02:00
d277650721 testbench: Added omkafka test with multiple kafka/zookeeper instances 2017-05-09 11:09:20 +02:00
PascalWithopf
1628ef2a37 testbench: workaround for solaris 2017-04-13 14:07:38 +02:00
Rainer Gerhards
af60b7f9e1 testbench: reduce start-/stop-timeout
The current value (5 minutes) seemed excessevily wrong and should
probably indicate an error in any case. The new value of 2 minutes
should be fairly safe as well.
2017-04-11 15:12:02 +02:00
Rainer Gerhards
203cf82be8 testbench: add support for solaris 2017-04-03 14:14:56 +02:00
Rainer Gerhards
8e83d6c280 testbench: improve error reporting in dynstats-related tests 2017-03-20 10:32:02 +01:00
Rainer Gerhards
e654c27af4 testbench: do not spam testbench log with output from ps command
ps is used when waiting on startup and spams the test log if
rsyslog takes longer to start up (or fails to do so). This
makes the log hard to read.
2017-03-02 08:20:35 +01:00
Rainer Gerhards
71984ef6c5 fix testbench: shutdown-immediate command did not work for instance 2 2017-02-02 15:32:49 +01:00