12127 Commits

Author SHA1 Message Date
Rainer Gerhards
f8de6179ce
Merge pull request #2573 from rgerhards/i2572
CI: test build of all components without atomic operations
2018-03-27 09:11:10 +02:00
Rainer Gerhards
faf41462d2
Merge pull request #2533 from rgerhards/i2359-imfile-data-structures
imfile: refactoring
2018-03-22 10:03:58 +01:00
Rainer Gerhards
ab1bd8c01b imfile: large refactoring of complete module
This commit greatly refactors imfile internal workings. It changes the
handling of inotify, FEN, and polling modes. Mostly unchanged is the
processing of the way a file is read and state files are kept.

This is about a 50% rewrite of the module.

Polling, inotify, and FEN modes now use greatly unified code. Some
differences still exists and may be changed with further commits. The
internal handling of wildcards and file detection has been completely
re-written from scratch. For example, previously when multi-level
wildcards were used these were not reliably detected. The code also
now provides much of the same functionality in all modes, most importantly
wildcards are now also supported in polling mode.

The refactoring sets ground for further enhancements and smaller
refactorings. This commit provides the same feature set that imfile
had previously and all existing CI tests pass, as do some newly
created tests.

Some specific changes:
- bugfix: module parameter "sortfiles" ignored
  This parameter only works in Solaris FEN mode, but is otherwise
  ignored.  Most importantly it is ignored under Linux.
  fixes https://github.com/rsyslog/rsyslog/issues/2528
- bugfix: imfile did not pick up all files when not present
  at startup
  fixes https://github.com/rsyslog/rsyslog/issues/2241
  fixes https://github.com/rsyslog/rsyslog/issues/2230
  fixes https://github.com/rsyslog/rsyslog/issues/2354
- bugfix: directories only support "*" wildcard, no others
  fixes https://github.com/rsyslog/rsyslog/issues/2303
- bugfix: parameter "sortfiles" did only work in FEN mode
  fixes https://github.com/rsyslog/rsyslog/issues/2528
- provides the ability to dynamically add and remove files via
  multi-level wildcards
  see also https://github.com/rsyslog/rsyslog/issues/1280
- the state file name currently has been changed to inode number
  This will further be worked on in upcoming PRs
  see also https://github.com/rsyslog/rsyslog/issues/2231
- some enhancements were also done to CI tests, most importantly
  they were made more compatibile with BSD

Note that most of the mentioned bug fixes cannot be applied to older
versions, as they fix design issues which are solved by the refactoring.
Thus there are not separate commits for them.

Distro maintainers: you need to decide to apply this patch as whole
or not. Believe me, it is not worth the effort to try to extract
specific patches from this commit. There is a good reason we do
not have multiple commits.

closes https://github.com/rsyslog/rsyslog/issues/2359
2018-03-22 08:25:47 +01:00
Rainer Gerhards
bd8ea7e12e CI: add test to build without atomic operations
closes https://github.com/rsyslog/rsyslog/issues/2572
2018-03-21 16:57:50 +01:00
Rainer Gerhards
ede56adbaf build system: provide option to build without atomic operations
see also https://github.com/rsyslog/rsyslog/issues/2572
2018-03-21 16:57:05 +01:00
Rainer Gerhards
852214dfa7
Merge pull request #2556 from rgerhards/testbench-cleanup
testbench: improve cleanup
2018-03-21 16:03:55 +01:00
Rainer Gerhards
8e0962d579
Merge pull request #2571 from rgerhards/testbench-disble-omprog
testbench: temporarily disable more racy omprog tests
2018-03-21 14:30:27 +01:00
Rainer Gerhards
fb00f3ef01 testbench: temporarily disable more racy omprog tests
I have obviously overlooked some...

see also https://github.com/rsyslog/rsyslog/issues/2403
2018-03-21 12:40:17 +01:00
Rainer Gerhards
4485af63e1 maintain ChangeLog 2018-03-21 11:18:37 +01:00
Rainer Gerhards
bf77f72ffb
Merge pull request #2570 from KaleviKolttonen/make_ratelimit_burst_unsigned_int
Make configuration setting SystemLogRateLimitBurst unsigned int
2018-03-21 11:13:13 +01:00
Kalevi Kolttonen
94f246fd1a Make configuration setting SystemLogRateLimitBurst unsigned int
rsyslog uses unsigned short for configuration setting
SystemLogRateLimitBurst. Being just 16 bits, unsigned short cannot
hold values bigger than 65535. On our LDAP server rsyslog misbehaved with
SystemLogRateLimitBurst being bigger than 65535. Make it unsigned int to
accept bigger values.
2018-03-20 20:27:25 +02:00
Rainer Gerhards
74c6d3c42e maintain ChangeLog 2018-03-20 17:10:37 +01:00
Rainer Gerhards
a1a602da39
Merge pull request #2567 from rgerhards/disable-imjournal-tests
testbench: disable imjournal tests temporarily due to issues
2018-03-20 17:06:43 +01:00
Rainer Gerhards
3662f98d11
Merge pull request #2562 from jgerhards/rscript-search
rscript: make function modules loadable
2018-03-20 14:32:15 +01:00
Rainer Gerhards
8eff70b187 maintain ChangeLog 2018-03-20 10:39:15 +01:00
Rainer Gerhards
d54d9fcedd
Merge pull request #2555 from rgerhards/imfile-memleak
stream/bugfix: memory leak on stream open if filename as already gene…
2018-03-20 10:36:07 +01:00
Rainer Gerhards
dfdc2f0445 testbench: disable imjournal tests temporarily due to issues
So we permit CI to work well while we work on solving the issue.

see: https://github.com/rsyslog/rsyslog/issues/2564
2018-03-19 19:06:24 +01:00
Rainer Gerhards
a4d078a784 maintain ChangeLog 2018-03-19 18:51:55 +01:00
Rainer Gerhards
329314709a
Merge pull request #2519 from richm/omelasticsearch-tls
omelasticsearch - add support for CA cert, client cert auth
2018-03-19 17:43:25 +01:00
Rainer Gerhards
47c7d9173a
Merge pull request #2554 from rgerhards/solaris-gcc
fix build issues on Solaris with gcc
2018-03-19 17:39:16 +01:00
Rainer Gerhards
a910ac65bd
Merge pull request #2559 from rgerhards/disable-omprog-tests
testbench: disable some racy omprog tests
2018-03-19 17:36:20 +01:00
Rainer Gerhards
87020b2f45
Merge pull request #2563 from rgerhards/fix-sendrcv_relp
nitfix: test included invalid parameter
2018-03-19 14:32:48 +01:00
Jan Gerhards
22fc00e897 rscript: make function modules loadable
function modules add functions to rainerscript dynamically,
change http_request into such a module (enabled by default).
This module can be used as a sample for future function modules.
2018-03-19 11:49:36 +01:00
Rainer Gerhards
5b7adcb232 nitfix: test included invalid parameter
now also given action a name for easier debug log check
2018-03-19 11:29:34 +01:00
Rainer Gerhards
f192ccc957 testbench: disable some racy omprog tests
these test are still instable and some concerns about their
validity at all have been raised. We now disable them to make
the testbench more reliable. Root cause needs to be investigated
and tests finally fixed or removed.

see also https://github.com/rsyslog/rsyslog/issues/2403
2018-03-19 08:37:21 +01:00
Rainer Gerhards
9c7d44e95c maintain ChangeLog 2018-03-19 08:34:56 +01:00
Rainer Gerhards
db5541a8db
Merge pull request #1992 from jsiwrk/feature/omprog_feedback_tests
omprog: added tests for transactions with feedback
2018-03-19 08:29:08 +01:00
Rainer Gerhards
ac9d77bae9 maintain ChangeLog 2018-03-18 13:10:45 +01:00
Rainer Gerhards
937abdd107
Merge pull request #2527 from hanazuki/improve-tests-glbl-umask
tests/glbl-umask.sh: Improve test stability
2018-03-18 13:09:11 +01:00
Rainer Gerhards
3c32c844b6 testbench: improve cleanup
some tests use rsyslog.out.* file names, which were so far not cleaned up.
This can lead to all sorts of problems, including failure of
"make distcheck" due to leftover files. We now delete all of these files
on cleanup. This should not have any undesired side-effects.

Thanks to Kasumi Hanazuki for spotting this problem.

see also https://github.com/rsyslog/rsyslog/pull/2527
2018-03-18 13:05:24 +01:00
Rainer Gerhards
193631eac7 stream/bugfix: memory leak on stream open if filename as already generated
this can happen if imfile reads a state file. On each open, memory for the
file name can be lost.

We detected this while working on imfile refactoring, there is no related
bug report. No specific test has been crafted, as the refactored imfile
tests catch it (as soon as they are merged).
2018-03-18 12:10:36 +01:00
Rainer Gerhards
1ea4bb2c42 fix build issues on Solaris with gcc 2018-03-18 11:07:16 +01:00
Rainer Gerhards
e2e4e18bd9
Merge pull request #2553 from rgerhards/lgtm-more-modules2
QA: enable even more modules in lgtm.com static analyzer
2018-03-18 10:18:37 +01:00
Rainer Gerhards
641912e9d3 tools/logctl: replace unsafe function
detected by lgtm static analyzer
2018-03-17 17:56:14 +01:00
Rainer Gerhards
4b00d2e4ed action.c: do not expose module-private static variable
detected by lgtm static analyzer
2018-03-17 17:20:09 +01:00
Rainer Gerhards
3b87d228d9 mmaudit: remove unused code
detected by lgtm static analyzer
2018-03-17 17:17:26 +01:00
Rainer Gerhards
015821d82c QA: add more modules to lgtm analyzer coverage 2018-03-17 16:48:20 +01:00
Joan Sala
2336e5ad65 omprog: added tests for transactions with feedback 2018-03-17 15:41:25 +01:00
Rainer Gerhards
77b7aec1c2 ompgsql: remove dead code
detected by lgtm static analyzer
2018-03-17 14:41:19 +01:00
Rainer Gerhards
7a170d86ea QA: enable even more modules in lgtm.com static analyzer 2018-03-17 14:22:41 +01:00
Rainer Gerhards
8070d9841d maintain ChangeLog 2018-03-17 12:52:59 +01:00
Rainer Gerhards
c0fc86d43e
Merge pull request #2551 from rgerhards/lgtm-more-modules
QA: make lgtm.com analyze more modules
2018-03-17 12:52:02 +01:00
Rainer Gerhards
e69bfa0650 maintain ChangeLog 2018-03-17 12:40:36 +01:00
Rainer Gerhards
80f2d145f5
Merge pull request #2526 from hanazuki/tests-missing-slash
tests/Makefile: Fix broken TESTS
2018-03-17 12:39:10 +01:00
Rainer Gerhards
ed1813dcb6
Merge pull request #2545 from hrak/master
omfile: Fix wrong order of arguments for errmsg
2018-03-17 12:37:21 +01:00
Rainer Gerhards
1fe2b08b89
Merge pull request #2546 from rgerhards/i2421
fix memory leak in imfile readmode 0
2018-03-17 12:36:05 +01:00
Rainer Gerhards
948f499456
Merge pull request #2550 from rgerhards/lgtm-1
fixing issues found by lgtm.com static analyzer
2018-03-17 12:34:30 +01:00
Rainer Gerhards
e64008b9c4 QA: make lgtm.com analyze more modules 2018-03-17 12:33:37 +01:00
Rainer Gerhards
a21e87f5ba fix invalidly-placed header guard
detected by lgtm static analyzer
2018-03-17 10:29:19 +01:00
Rainer Gerhards
6d850a1aa9 fix behaviour not totally defined by C standard
see also: https://stackoverflow.com/questions/32916575/how-to-use-zd-specifier-with-printf

detected by lgtm static analyzer
2018-03-17 10:26:27 +01:00