12785 Commits

Author SHA1 Message Date
Rainer Gerhards
4e2314f7bf
Merge pull request #2983 from jsiwrk/feature/omprog_feedback_improvements
omprog: add feedback timeout and keep-alive feature
2018-09-05 11:07:46 +02:00
Rainer Gerhards
3cb6adc5e8
Merge pull request #2986 from rgerhards/tb17
testbench: use a reliable dynamic imdiag port
2018-09-05 10:48:21 +02:00
Rainer Gerhards
a45f3af81d squash: wait until full startup so that imdiag.port exists 2018-09-05 09:21:42 +02:00
Rainer Gerhards
bf755c1943
Merge pull request #2990 from rgerhards/errmsg-omfwd
omfwd: remove invalid error message
2018-09-04 20:36:29 +02:00
Rainer Gerhards
0ce02e4a71
omfwd: remove invalid error message
The config plumbing itself provides an error message. The one given here
was also totally wrong ;-)

Thanks to Frank Bicknell for spotting this message and making me alert.
2018-09-04 12:35:11 +02:00
Rainer Gerhards
3b301f6f4b
maintain ChangeLog 2018-09-04 12:31:06 +02:00
Rainer Gerhards
3ae8dfdd67
Merge pull request #2977 from fbicknel/fbicknel/fix_dynafile_error_message
WiP: Fix errant error message when dynafile param needed
2018-09-04 12:26:46 +02:00
Rainer Gerhards
566788ecac * remove unnecessary calls to "wait_startup"
This is automatically called by "startup" and "startup_vg". Tests
  looked like a left-over from old testbench plumbing.
2018-09-04 10:50:57 +02:00
Rainer Gerhards
97a6730a92
testbench: use a reliable dynamic imdiag port
this also requires changes to some tooling.

Also, when assigning a dynamic port in tcpserver, the same port
number is used for IPv4 and IPv6.

Also removing some left-over debug output.

closes https://github.com/rsyslog/rsyslog/issues/2987
2018-09-04 09:09:50 +02:00
Rainer Gerhards
3aaf36a2ed
Merge pull request #2985 from rgerhards/tb16
modernize testbench plumbing
2018-09-03 22:20:56 +02:00
Joan Sala
c196e8f054 omprog: add feedback timeout and keep-alive feature
Restart the program if it does not respond within timeout.
New setting 'confirmTimeout' (default 10 seconds).

Allow the program to provide keep-alive feedback when a
message requires long-running processing.

Improve efficiency when reading feedback line (use buffer).

Retry interrupted writes/reads to/from pipe.

New setting 'reportFailures' for reporting error messages
from the program.

Report child termination when writing to pipe.

Minor refactor: renamed writePipe function to sendMessage,
renamed readPipe to readStatus.
2018-09-03 22:05:30 +02:00
Rainer Gerhards
7d943b0faa
testbench: modernize plumbing
* unify content-cmp with cmp_exact
* remove no longer needed content-check commands
* change to bash functions
  - custom-content-check
  - check-command-available
2018-09-03 16:27:00 +02:00
Rainer Gerhards
de906074d3
Merge pull request #2984 from jsiwrk/bugfix/omprog_parallel_test
testbench: minor fix on some omprog tests for parallel execution
2018-09-03 14:47:14 +02:00
Rainer Gerhards
95436a38de
Merge pull request #2970 from PascalWithopf/dynamic-ports
lstnPortFileName: abort when file can't be opened
2018-09-03 12:37:59 +02:00
Rainer Gerhards
81fac28d15
Merge pull request #2981 from rgerhards/tb15
testbench: modernize plumbing
2018-09-03 11:20:57 +02:00
Rainer Gerhards
27cc298a3d squash: content-check 2018-09-03 10:05:18 +02:00
PascalWithopf
14315e1b79 lstnPortFileName: abort when file can't be opened
Until now it was tried to write to the file even
if it couldn't be opened. Now the process is aborted.
2018-09-03 08:16:00 +02:00
Joan Sala
697f2032c7 testbench: minor fix on some omprog tests for parallel execution 2018-09-02 23:03:29 +02:00
Rainer Gerhards
c490a10168
Merge pull request #2982 from jsiwrk/bugfix/omprog_output_write_lock
omprog: fix output file write lock not always released
2018-09-02 18:31:40 +02:00
Rainer Gerhards
d051a9bdb6 squash: more changes 2018-09-02 17:46:16 +02:00
Rainer Gerhards
b5a385a13d testbench: modernize plumbing
another set of changes for testbench modernization
2018-09-02 17:29:39 +02:00
Rainer Gerhards
2ae669c206
Merge pull request #2980 from rgerhards/tb13
testbench: avoid "readlink" which is not available on AIX
2018-09-02 17:24:32 +02:00
Joan Sala
5b87c56676 omprog: fix output file write lock not always released
Fix bug introduced in #2945: output file write lock was not released if
an error occurred writing the file.
2018-09-02 16:47:13 +02:00
Rainer Gerhards
1dd0b9c20d
testbench: avoid "readlink" which is not available on AIX
The testbench framework uses it, but as it looks for no good reason.
2018-09-02 14:12:20 +02:00
Rainer Gerhards
77399659f6
Merge branch 'feature/omprog_child_output' of https://github.com/jsiwrk/rsyslog into merge 2018-09-02 13:54:43 +02:00
Rainer Gerhards
609f25ffae
Merge pull request #2978 from rgerhards/tb12
testbench: streamline plumbing
2018-09-02 12:49:56 +02:00
Rainer Gerhards
8ff395ccd6
Merge pull request #2968 from rgerhards/tb10
testbench: short test id and make more reliable
2018-09-02 12:31:27 +02:00
Rainer Gerhards
b9dd4beda2
testbench: make mmkubernetes tests use an "official" testbenach API
to wait for process startup, the rsyslog startup calles were (ab)used. This
caused issues whenever they were updated to new rsyslog needs. Now a dedicated
"API" for process startup has been added and the tests been modified to use it.
2018-09-02 10:58:12 +02:00
Joan Sala
4a54c23dc0 omprog: improve child process output capture/redirection
Capture program output using a pipe shared with all child processes,
and write to the file using a dedicated thread. Ensures lines emitted
by the child processes will not be intermingled in the output file if
the lines are less than PIPE_BUF chars long and are written in line-
buffered mode.

Reopen output file on HUP, to support external rotation of the file.

New setting 'fileCreateMode' as in omfile.

With these improvements the 'output' setting should now be usable for
production (it was originally intended only for debugging).

Redirect stdout/stderr of child process to /dev/null when not captured.
Closes #2787

Minor: simplify some test code: 'wait-startup' not needed after
'startup', 'wait-queueempty' not needed before 'shutdown_when_empty'.
2018-09-02 10:35:59 +02:00
Rainer Gerhards
fef0ece328
testbench: fix slightly incorrect tests
they use test framework incorrectly, and thus leave files during
"make distcheck"
2018-09-02 10:01:43 +02:00
Rainer Gerhards
20696a754b
testbench: streamline plumbing
no functional changes, but modernization and cleanup
2018-09-01 13:18:50 +02:00
Rainer Gerhards
a6e4c6e3c2
Merge pull request #2969 from PascalWithopf/default-port
imdiag: port 0 is now accepted
2018-09-01 12:36:10 +02:00
Rainer Gerhards
f3fd4f8215
maintain ChangeLog 2018-09-01 12:34:15 +02:00
Rainer Gerhards
a68bdffa6f
Merge pull request #2973 from rgerhards/aix3
AIX portability fixes
2018-09-01 12:33:35 +02:00
Rainer Gerhards
2b28661246 testbench: short test id and make more reliable
The RSYSLOG_DYNNAME used to make test file unique was very long,
which potentially causes issues with some test scenarios.
see also: https://github.com/rsyslog/rsyslog/pull/2945#issuecomment-417078768

Also, the dynamic port determination method we currently use
is not 100% reliable. That port number was used inside the DYNNAME
and thus was not necessarily unique. This has now changed to the
current time in microseconds plus a hash of the test file name. This
should be sufficiently unique. If still not, we can now simply
extend the test_id program (e.g. read /dev/urandom).
2018-09-01 12:32:33 +02:00
PascalWithopf
aec60a90e4 tcp driver: port 0 is now accepted
Until now when port 0 was specified in imtcp, imgssapi or imdiag,
it was automatically changed to 514 in tcpsrv.
Imtcp and imgssapi accept port 0, but only if parameter listenPortFileName
(imgssapi: inputgsslistenportfilename) is specified. Otherwise it will
still change the port.
Imdiag always accepts 0 as a port and will create a socket with a random
port.
2018-09-01 10:29:59 +02:00
Frank Bicknell
d3edc4eb71 Fix errant error message when dynafile param needed
Per issue 2975
2018-08-31 13:04:32 -04:00
Rainer Gerhards
5d144c0e62 testbench: make plumbing work on AIX
also fix issue with mmanon - tests were executed even if module
was not enabled
2018-08-31 09:06:46 -05:00
Rainer Gerhards
11273d8738 testbench: fix portability issues under AIX 2018-08-31 09:06:46 -05:00
Rainer Gerhards
97800407aa AIX: make rsyslog export basic symbols correctly
the AIX dynamic linker needs some help in understanding which
symbols can be dyanamically linked at runtime
2018-08-31 09:06:40 -05:00
Rainer Gerhards
a66707f48f
Merge pull request #2972 from rgerhards/aix2
tcpflood: fix segfauls on some platforms (e.g. AIX)
2018-08-31 14:40:33 +02:00
Rainer Gerhards
6efae3c2fd fix compile warnings under AIX
see also https://github.com/rsyslog/rsyslog/issues/2971
2018-08-31 05:14:01 -05:00
Rainer Gerhards
3741bee656 tcpflood: fix segfauls on some platforms (e.g. AIX)
The default stack size on some platforms is insufficient, so we
need to explicitely set it.
2018-08-31 04:48:00 -05:00
Rainer Gerhards
59c6b71c2b
maintain ChangeLog 2018-08-30 16:22:52 +02:00
Rainer Gerhards
a2885e0c26
Merge pull request #2967 from PascalWithopf/bind-same-port
nsd_ptcp: add Error message on failed socket bind
2018-08-30 16:21:15 +02:00
PascalWithopf
56b67190c0 nsd_ptcp: add Error message on failed socket bind 2018-08-30 11:26:27 +02:00
Rainer Gerhards
8a88e36c11 AIX: adding seemingly missing file strippedsymbols.exp
This file is referenced inside IBM's AIX configure.ac code but
cannot be found inside the source. I found it mentioned in some
mail an added it to the source of the project tree.

I do *NOT* know if the content or location is correct nor am
I able to verify if the build succeeds or not.

see also: https://github.com/rsyslog/rsyslog/issues/2597
2018-08-30 10:08:19 +02:00
Rainer Gerhards
cd424f089e
Merge pull request #2964 from PascalWithopf/dynamic-ports
imptcp: add parameter ListenPortFileName
2018-08-29 18:06:49 +02:00
Rainer Gerhards
8ccf1a18b6
Merge pull request #2966 from rgerhards/no-journaltest
testbench: disable journal tests by default
2018-08-29 18:02:10 +02:00
PascalWithopf
df85be1130 tcp driver: add support for parameter LstnPortFileName 2018-08-29 15:14:29 +02:00