15342 Commits

Author SHA1 Message Date
Rainer Gerhards
e2b1008794
prepare for 8.2210.0 release v8.2210.0 2022-10-16 17:55:23 +02:00
21b68afa03 testbench: Adjusted timing for test imfile-logrotate-async.sh
In some cases, the logrotate is not fast enough rotating the
logfile after sighub has been send to inputfilegen process. It appears
to happen more often on github CI machines, when it happens,
inputfilegen reopens the NOT yet rotated file and keeps writing
into it. However most messages written until the next sighub are lost
after the logfile finally is rotated.

In order to avoid this, I have added an extra sleep between file
CLOSE and OPEN after sighub with a default of 5ms which appears to work
very well. This should give logrotate enough time to perform the
actuzal rotate.

Also added another parameter to inputfilegen to keep the process
open after finish. Which helps syncing with the testcases.

closes: https://github.com/rsyslog/rsyslog/issues/5000
2022-10-14 11:15:45 +02:00
Rainer Gerhards
010429540b
maintain ChangeLog 2022-10-13 09:52:22 +02:00
Rainer Gerhards
2adea34541
Merge pull request #4994 from he32/netbsd-32-fix
atomic_operations.m4: also test these ops on time_t
2022-10-13 09:49:43 +02:00
Rainer Gerhards
e937865f45
maintain ChangeLog 2022-10-12 13:04:17 +02:00
Rainer Gerhards
ef8760b4c5
Merge pull request #4951 from 21stcaveman/omrabbitmq-tls
omrabbitmq: Add TLS support
2022-10-12 12:56:05 +02:00
Rainer Gerhards
e641c71ea4
Merge pull request #4993 from alorbach/pr-issue-4958
testbench: fix imfile-statefile-delete.sh (INOTIFY trigger)
2022-10-12 12:47:55 +02:00
Havard Eidnes
6e58332f61 atomic_operations.m4: also test these opts on time_t.
On NetBSD, time_t has for a long time now been __int64_t.
On 32-bit CPUs, the compiler is not obliged to define
__sync_bool_compare_and_swap_8, so instead this ends up
as an undefined symbol when linking rsyslog.  This makes
the code fall back to the pthread / locking method on these
systems, but at least lets the program build.
2022-10-07 21:46:08 +02:00
e8c6cc91ab testbench: fix imfile-statefile-delete.sh (INOTIFY trigger)
Due the patch in PR https://github.com/rsyslog/rsyslog/pull/4895
state files are deleted with a 5 second delay in order to fix
missing or duplicated messages. However in INOTIFY mode, we need
an INOTIFY event to trigger a poll_tree that triggers the
delayed deletion. The testcase imfile-statefile-delete.sh will now
create empty dummy files after 6 seconds delay in order to trigger
INOTIFY events.

This fixes & closes https://github.com/rsyslog/rsyslog/issues/4958
2022-10-05 20:41:09 +02:00
Rainer Gerhards
c2060adfeb
maintain ChangeLog 2022-09-14 09:56:57 +02:00
Rainer Gerhards
3b554ef7e4
Merge pull request #4904 from rgerhards/i4902
config: add "abortOnFailedQueueStartup" global config parameter
2022-09-14 09:53:12 +02:00
Rainer Gerhards
b08d69078c
maintain ChangeLog 2022-09-07 10:14:23 +02:00
Rainer Gerhards
0f3af16ddb
Merge pull request #4962 from seuzw930/master
Fix memory leak when SetString reassign to pThis->szVal.psz
2022-09-07 09:58:38 +02:00
Rainer Gerhards
cf7c2d58db
maintain ChangeLog 2022-09-07 09:26:45 +02:00
Rainer Gerhards
d083a2a2c2
Merge pull request #4977 from rgerhards/i4975
core bugfix: correct local host name after config processing
2022-09-07 09:24:55 +02:00
Rainer Gerhards
ba00a9f252
core bugfix: correct local host name after config processing
rsyslog.conf may affect the host's local name. These changes were
so far only activated after the first HUP. This patch now ensures
that the configured local host name is applied correctly throughout
all processing, including early startup.

This patch causes a slight change of behaviour. However, the behaviour
was inconsitent before. Now it is consistent and according to the config.

Please note: this patch also exposes a global entry point via "regular"
dynamic loading as this makes things much easier to do. This is in-line
with ongoing simplification effort.

Finally, we also remove a CI test that we do no longer need because
the problem covered is now addressed differently and the original issue
can no longer occur.

closes https://github.com/rsyslog/rsyslog/issues/4975
2022-09-06 13:01:37 +02:00
Rainer Gerhards
a2fcf289c6
Merge pull request #4905 from alorbach/relp-sndrcv-tests
testbench: Add more valgrind tests for sndrcv (omrelp/imrelp)
2022-09-02 12:13:59 +02:00
0bec49cbe3 testbench: Add more valgrind tests for sndrcv (omrelp/imrelp)
- These tests will help find race conditions hopefully
- fix diag.sh issues running second instance in valgrind mode only
- Add check for minimum valgrind version for new relp tests
2022-09-01 13:59:49 +02:00
Rainer Gerhards
fae9326daf
maintain ChangeLog 2022-08-31 15:18:24 +02:00
Rainer Gerhards
580d239535
Merge pull request #4969 from rgerhards/imtcp-notifyconnectionopen
imtcp: add option notifyonconnectionopen
2022-08-31 14:36:57 +02:00
Rainer Gerhards
5554170a09
Merge pull request #4971 from rgerhards/imtcp-cleanup
tcpsrv: cleanup - remove commented out code
2022-08-30 15:24:53 +02:00
Rainer Gerhards
bfe42e5bcb
Merge pull request #4974 from alorbach/pr-fix-openssl-debug
openssl: fix osslLastSSLErrorMsg call
2022-08-29 15:01:09 +02:00
1539780335 openssl: fix osslLastSSLErrorMsg call
added due missing rebase in PR 4889
2022-08-29 12:44:13 +02:00
Rainer Gerhards
2b32d8dd7e
maintain ChangeLog 2022-08-26 16:28:05 +02:00
Rainer Gerhards
ffd0acc9ca
Merge pull request #4889 from sarroutbi/ca_extra_files
Add mechanism to include extra CA files parameter
2022-08-26 16:20:38 +02:00
Rainer Gerhards
22bef1c862
tcpsrv: cleanup - remove commented out code 2022-08-23 14:45:11 +02:00
Rainer Gerhards
4c66ab3abc
imtcp: add option notifyonconnectionopen
Add this both as module an input parameter. Complements already-existing
config param notifyonconnectionclose and mirrors the similar feature from
imptcp.

The module parameter acts as default, similarly to notifyonconnectionclose.

Note that in contrast to imptcp, we emit IP addresses and not host
names. This sticks with the traditional semantics of imtcp.

Note that we also fixed a mislading error message in the case when a
disallowed sender tried to connect.

Thanks to John Chivian for suggesting the addition.
2022-08-23 14:41:57 +02:00
21stcaveman
7209ff1a4b Allow enabling AMQP heartbeat and it's interval 2022-08-20 12:23:07 -07:00
Rainer Gerhards
6b4210f3df
maintain ChangeLog 2022-08-19 09:08:50 +02:00
Rainer Gerhards
9eb97cc18d
bump version number for next scheduled stable cycle 2022-08-19 09:07:42 +02:00
Rainer Gerhards
59925b063d Merge branch 'v8-stable' 2022-08-19 09:06:26 +02:00
Rainer Gerhards
1d1598dc53
Merge pull request #4957 from julthomas/dev/jth/rsyslog-8.2208.0-gcc-lt-5
conf: Fix #pragma GCC diagnostic not allowed inside functions
2022-08-19 08:44:12 +02:00
Julien Thomas
21b5e0225e build: Fix #pragma GCC diagnostic not allowed inside functions
Commit 829a6f6 "CI: improve use of github action matrix feature;
optimization" has introduced use of #pragma GCC diagnostic in function
doNameLine() of runtime/conf.c. This is not supported by old compilers
like GCC 4.4.7 on el6.
2022-08-19 00:11:46 +02:00
seuzw930
b3ba1d7280 Fix memory leak when SetString
During SetString reassign to pThis->szVal.psz, pThis->szVal.psz might not null. It resulted in memory leak and this patch fixes this behaviour.

The problem is mentioned here:
https://github.com/rsyslog/rsyslog/issues/4961
2022-08-18 18:56:00 +08:00
Rainer Gerhards
edd25fac04
config: add "abortOnFailedQueueStartup" global config parameter
similiar to "abortONUncleanConfig", this parameter aborts rsyslog
when a queue has problems during startup. Some users perfer rsyslog
to terminate in this case. By default, nothing changes.

closes https://github.com/rsyslog/rsyslog/issues/4902
2022-08-16 15:09:17 +02:00
Rainer Gerhards
e8d1288ea1
prepare for 8.2208.0 scheduled stable release v8.2208.0 2022-08-09 09:11:09 +02:00
Rainer Gerhards
f901f113d2
maintain ChangeLog 2022-08-09 09:07:27 +02:00
Rainer Gerhards
8a9f1b1dff
Merge pull request #4954 from t-feng/master
Fix Segmentation fault in close journal
2022-08-09 09:05:21 +02:00
Rainer Gerhards
4d63968e4c
Merge pull request #4952 from taavi-valjaots/ksi-network-send-timeout-fix
ksi bugfix: request cache size and send timeout issue fixed.
2022-08-09 09:03:59 +02:00
Rainer Gerhards
d14de2e98b
Merge pull request #4930 from bitsolve/sha256AuthFingerprints
support sha256 for StreamDriverAuthMode="x509/fingerprint"
2022-08-09 08:59:45 +02:00
21stcaveman
ac75618be3 omrabbitmq: Add TLS support 2022-08-08 20:33:56 -07:00
t.feng
eab250be37
Fix Segmentation fault in close journal 2022-08-08 11:36:59 +08:00
taavi.valjaots
24a3f2dbd9 ksi bugfix: request cache size and send timeout issue fixed.
Async service send timeout is not configurable and request cache size is too
small to handle large amount of signing requests with small amount of permitted
requests per aggregation round. For example user with max_requests = 4 results
cache size 5 * max_requests or at least 256. When signing 300 log files cache
will be too small resulting several unsigned blocks. When signing 200 log file
cache will be adequate, but with rate of 4 signatures per second, it is only
possible to sign 4 * 10 blocks before all requests that are not sent out will
timeout.

Fix for the issue is to make send timeout configurable and make the size of the
cache depend on the value of send timeout. New configuration value
sig.block.signtimeout="time, s" introduced that defines the time window wherein
the block has to be signed. The size of the request cache is increased to
3 * max_requests * sign_timeout or at least 256.
2022-08-05 17:21:41 +03:00
Rainer Gerhards
8dce9f2dc6
Merge pull request #4895 from rgerhards/i4797-fix
imfile bugfix: message loss/duplication when monitored file is rotated
2022-08-05 14:49:53 +02:00
Rainer Gerhards
53dc5ed2d6
Merge pull request #4949 from taavi-valjaots/optimized-signer-task-processing
ksi bugfix: optimize processing of signer queue to fix redundant delays.
2022-08-05 14:48:21 +02:00
taavi.valjaots
9166e22f29 ksi bugfix: optimize processing of signer queue to fix delays.
There is a worker queue where rsyslog KSI module collects events and signing
requests. When queue is processed thread is periodically put to sleep. Previous
implementation handles signature requests well but sleeps every time after
handling new file open / close event. When several log files are opened or
closed simultaneously process is significantly slowed down. Another issue is
that thread always sleeps 1000ms that may be 2x longer than aggregation round.
This slows down overall signing process.

Fix for the issue is to simply not sleep after file open / close event if there
are next items to be processed. To speed up the signing process, rsyslog uses
KSI aggregator conf. to obtain the aggregation period that is used for the sleep
time configuration.
2022-08-04 16:26:23 +03:00
Rainer Gerhards
7897e76855
maintain ChangeLog 2022-08-04 15:17:08 +02:00
Rainer Gerhards
967d81c40c
Merge pull request #4942 from taavi-valjaots/periodic-conf-requests
ksi bugfix: possible crash fixed when several log files are opened
2022-08-04 15:15:34 +02:00
Rainer Gerhards
5520373959
imfile bugfix: message loss/duplication when monitored file is rotated
When a to-be-monitored file is being rotated, some messages may be lost or
duplicated. In case of duplication, many file lines may be duplicated
depending on actual timing. The whole bug was primarily timing depenedent
in general. It most often was visible in practice when the monitored
file was very frequently rotated (we had some report with every few
seconds).

Note that while we try hard to not lose any messages, input file
rotation always has some loss potential. This is inevitable if
the monitored file is being truncated.

Also note that this bugfix affects imfile, only. It has nothing to do
and no relation to rsyslog output files being rotated on HUP.

closes: https://github.com/rsyslog/rsyslog/issues/4797
2022-08-04 12:54:07 +02:00
Rainer Gerhards
6be9a266ea
testbench: add testcase for frequent imfile input file change
PoC test, yet incomplete

This patch not only contains the new test but also supporting
changes to testbench tooling.

see also: https://github.com/rsyslog/rsyslog/issues/4797
2022-08-04 12:54:07 +02:00