18879 Commits

Author SHA1 Message Date
Rainer Gerhards
5c202bd2fd
Merge pull request #5926 from rgerhards/doc-phase1b
doc: add v8 locking note
2025-08-13 11:37:13 +02:00
Rainer Gerhards
32f504605b
doc: add v8 locking note
Add "Concurrency & Locking" to dev_action_threads.rst:
multiple workers per action; WID is per-worker; shared pData must be
mutex/rwlock-protected; direct mode still needs module-side serialization
for inherently serial resources.
2025-08-13 11:25:15 +02:00
Rainer Gerhards
04dad1a9dc
Merge pull request #5913 from alorbach/doc-add-dev_action_threads
docs: add developer page "Action Threads and Queue Engine"
2025-08-13 11:11:19 +02:00
Rainer Gerhards
c8f376a4ff
Merge pull request #5907 from rsyslog/codex/enhance-doxygen-comments-in-omamqp1
omamqp1: clarify worker thread and fix buffer growth
2025-08-13 11:10:57 +02:00
Cursor Agent
4287b8c469
docs: add developer page "Action Threads and Queue Engine"
Introduce a new developer-oriented documentation page:
File: doc/source/development/dev_action_threads.rst
Content:
- End-to-end overview of the rsyslog queue engine (producers → rulesets → actions)
- Terminology
- Mermaid flowchart for thread and queue topology
- State diagram for watermarks/backpressure
- Sequence diagram for action-queue lifecycle
- Error handling (retry/suspend) and shutdown behavior
- Queue types and selection guidance
- Key queue parameters and cross-references

Motivation:

Provide a single, high-signal reference for contributors to understand the queue engine and action worker model, with visualizations to aid comprehension.
Update dev_queue.rst with note about outdated content and reference to dev_action_threads

Co-authored-by: alorbach <alorbach@adiscon.com>
2025-08-13 11:08:21 +02:00
Rainer Gerhards
a5ff9048dd
Merge pull request #5924 from rsyslog/codex/restructure-rsyslog-docs-for-omelasticsearch-module
docs: split omelasticsearch params into individual pages
2025-08-13 10:27:30 +02:00
Rainer Gerhards
09445fa6ad
docs: split omelasticsearch parameters into dedicated reference pages
Refactored omelasticsearch.rst by moving each parameter description
into its own file under doc/source/reference/parameters/, one per
parameter. Each new page contains:

- Standardized metadata (Name, Scope, Type, Default, Required?, Introduced)
- Concise summary block for inclusion in the overview table
- Verified and clarified type information
- Usage examples for module/action contexts
- Legacy or alternate name mappings where applicable

Updated omelasticsearch.rst to present a list-table with :ref: links
and inline summaries for all parameters, plus a hidden toctree linking
to the new reference pages.

This change brings omelasticsearch documentation in line with the
structured parameter format adopted for other modules, improving
maintainability, readability, and navigation for both human users and
AI systems.

No functional changes; documentation only.
2025-08-13 10:23:49 +02:00
Rainer Gerhards
8577432d89
Merge pull request #5923 from rgerhards/doc-pmrfc3164
docs: split pmrfc3164 parameters into structured reference pages
2025-08-13 10:14:21 +02:00
Rainer Gerhards
8bf57f6633
docs: split pmrfc3164 parameters into structured reference pages
Refactored pmrfc3164.rst to move individual parameter descriptions into
dedicated files under doc/source/reference/parameters/, one per parameter.
Each new page contains:

- Consistent metadata (Name, Scope, Type, Default, Required?, Introduced)
- Concise summary blocks for inclusion in overview tables
- Corrected and clarified type info (boolean/string)
- Usage examples for parser configuration
- Legacy/alternate name mappings

pmrfc3164.rst now presents parameters via a list-table with :ref: links
and inline summaries, plus a hidden toctree for the new reference pages.

This brings pmrfc3164 documentation in line with the structured parameter
format used in other modules, improving maintainability, readability,
and navigation.

No functional changes; documentation only.
2025-08-13 10:09:00 +02:00
Rainer Gerhards
d41cbb27b1
Merge pull request #5922 from rsyslog/codex/restructure-rsyslog-docs-for-single-module
docs: extract imjournal parameter pages
2025-08-13 10:04:26 +02:00
Rainer Gerhards
e3e3ee565f
docs: split imjournal parameter docs into dedicated reference pages
Refactored imjournal.rst to move detailed parameter descriptions into
individual files under doc/source/reference/parameters/, one file per
parameter. Each page now includes:

- Consistent metadata (Name, Scope, Type, Default, Required?, Introduced)
- Concise summary blocks for list-table inclusion
- Updated and clarified type information (boolean/string/integer)
- Corrected legacy/obsolete name mappings
- Usage examples for module and input scopes

imjournal.rst now uses list-tables with :ref: links to these pages and
includes summaries inline for quick scanning. This aligns imjournal’s
documentation structure with other modules, improves maintainability,
and enhances reusability for AI-assisted and human navigation.

No code changes; documentation only.

With support from AI agents: Codex, Gemini
2025-08-13 10:00:19 +02:00
Rainer Gerhards
d436497c1e
Merge pull request #5920 from rgerhards/action-flow-step1
doc: reference AI module map in AGENTS.md and DEVELOPING.md
2025-08-12 18:21:01 +02:00
Rainer Gerhards
ecfe038880
doc: reference AI module map in AGENTS.md and DEVELOPING.md
Added cross-references to doc/ai/module_map.yaml in both developer-
facing guides:

- AGENTS.md:
  * Mentioned the AI module map in the Repository Overview and
    Quickstart sections.
  * Added a common task instructing contributors to consult the map
    before making edits.

- DEVELOPING.md:
  * Updated “Pointers” to include the AI module map as a source for
    per-module paths and known locking hints.

This improves discoverability of module locations and expected locking
patterns for both AI agents (e.g., Codex) and human contributors,
reducing time spent locating code and relevant design notes.

No functional changes; documentation only.
2025-08-12 18:19:59 +02:00
Rainer Gerhards
a3d4ba0418
Merge pull request #5919 from rgerhards/doc-refactor-omfile2
doc: refactor omfile documentation into structured parameter pages
2025-08-12 18:08:20 +02:00
Rainer Gerhards
b5c6278eb7
doc: refactor omfile documentation into structured parameter pages
Split monolithic omfile.rst content into dedicated parameter reference
files under doc/source/reference/parameters/, one file per parameter.
Added :toctree: entries and summary include blocks to omfile.rst for
both module and action parameters. Introduced consistent metadata
(Name, Scope, Type, Default, Required?, Introduced) and usage examples
for each parameter page, along with legacy name mappings where
applicable.

This change improves documentation maintainability, readability, and
AI/RAG ingestion by:
- Enforcing consistent structure across parameter docs
- Separating module and action scopes in a clear, reusable format
- Linking parameter summaries directly from omfile.rst via list-tables
- Preserving legacy directive references for backward compatibility

No functional changes to rsyslog.
2025-08-12 18:04:28 +02:00
Rainer Gerhards
d9714ce63d
Merge pull request #5917 from rgerhards/doc-imdocker-refactor
doc: refactor imdocker module param docs into structured ref pages
2025-08-12 15:48:04 +02:00
Rainer Gerhards
2eac2fe48e
doc: refactor imdocker module param docs into structured ref pages
Migrates all imdocker module parameter descriptions from the monolithic
module page into individual parameter reference files under
doc/source/reference/parameters/. Each parameter now has:

- A stable Sphinx label and cross-references
- A concise summary section for use in tables and AI ingestion
- Clear metadata (scope, type, default, introduced version)
- RainerScript usage examples
- "See also" links back to the main module page

The imdocker.rst page now uses a compact parameter list-table with
embedded summaries and a hidden toctree linking to full parameter pages.
This aligns with the new documentation structure for better maintainability,
human readability, and machine ingestion (e.g. for RAG-based assistants).
2025-08-12 15:43:04 +02:00
Rainer Gerhards
bfc623d6ac
Merge pull request #5916 from rgerhards/doc-imdocker-legacy-fix
doc: imdocker had invalid legacy config stmt info - removed
2025-08-12 15:22:34 +02:00
Rainer Gerhards
ce7157f548
doc: imdocker had invalid legacy config stmt info - removed 2025-08-12 15:20:53 +02:00
Rainer Gerhards
5448cc7d92
Merge pull request #5914 from rgerhards/doc-strategy
doc: update to doc (improvement) strategy
2025-08-12 09:59:52 +02:00
Rainer Gerhards
701236f653
doc: update to doc (improvement) strategy
most importantly reflects necessary interim work.
2025-08-12 09:59:11 +02:00
Rainer Gerhards
2de875ae61
Merge pull request #5909 from rgerhards/custom_gpt
Custom gpt prompt improvements
2025-08-11 17:19:24 +02:00
Rainer Gerhards
0cb05fb066
AI: base prompt for custom GPT - initial GPT 5 version
GPT 5 has problems accessing the RAG which GPT 4 did not have. But it
may also be that GPT 4 simply did not tell us about these problems.

My guess is that the new anti-hallucination algo is at work here. This
is generally good, albeit it broke the rsyslog Assistant a bit.

As a short-term measure we have enabled it to search rsyslog.com. That
will still remove all the garbagged. My first impression is that this
might be even better than a RAG based system with larger files. This
needs to be seen in practice now.

see also https://github.com/rsyslog/rsyslog/issues/5903
2025-08-11 17:12:06 +02:00
Rainer Gerhards
369202a030
AI: base prompt for custom GPT - GPT 4 version 2025-08-11 16:58:35 +02:00
Rainer Gerhards
16a80c43ff omamqp1: resize buffer via realloc with error handling 2025-08-11 15:54:29 +02:00
Rainer Gerhards
fe6bdc2824
Merge pull request #5905 from rgerhards/omazure-inlinedoc
omazureeventhubs: add Doxygen docs for proton thread and flow (NFC)
2025-08-11 15:53:17 +02:00
Rainer Gerhards
0db4f4b9ed omazureeventhubs: add Doxygen docs for proton thread and flow (NFC)
Add concise Doxygen \brief blocks and inline comments to explain the
qpid-proton integration and worker interaction. This improves
maintainability and lowers ramp-up time for contributors.

Key additions:
- Document connection lifecycle: openProton(), closeProton(),
  setupProtonHandle().
- Document async model: proton_run_thread(), proton_thread(),
  handleProton(), handleProtonDelivery().
- Document batching/ack path: writeProton() and commitTransaction().
- Explain the 100 ms sleep to avoid busy waiting.

Style and housekeeping:
- Split DEFobjCurrIf(...) macros onto separate lines.
- Fix indentation of azureStats declaration.
- Update copyright header to 2014-2025.

Behavior unchanged; comments and formatting only.
2025-08-11 13:01:48 +02:00
5020077743
Merge pull request #5896 from alorbach/pr-issue-5895
omazurevenethubs: fix compiler warning
- docker: add libqpid-proton build deps to ubuntu/24.04 base container
- CI: build omazureventhubs in run_checks ubuntu/24.04
2025-08-04 18:03:39 +02:00
619b5983c7 omazurevenethubs: fix compiler warning
- docker: add libqpid-proton build deps to ubuntu/24.04 base container
- CI: build omazureventhubs in run_checks ubuntu/24.04

closes: https://github.com/rsyslog/rsyslog/issues/5895
2025-08-04 12:43:45 +02:00
Rainer Gerhards
07d33e0c54
Merge pull request #5889 from rgerhards/ommysql
omysql: better doc to clarify mutex use
2025-08-01 17:42:25 +02:00
Rainer Gerhards
11bf43a1a8
omysql: better doc to clarify mutex use
We need to validate the locking method - in theory, multiple access to
the mysql handle should not be possible, because instance data is
worker-local. However, the following 2021 commit suggests there were some
issue. I tend to say the commit was wrong, but this needs to be checked
in more depth, while we need some better doc on the current locking method
right now. So we document existing and valid behaviour and will follow up later.

related commit:
a3b2983342
2025-08-01 17:13:32 +02:00
Rainer Gerhards
1e4a0a6346
maintain ChangeLog 2025-08-01 14:55:29 +02:00
Rainer Gerhards
e3728b3479
Merge pull request #5888 from rgerhards/variadic
core: migrate callback invocations to type-safe signatures
2025-08-01 14:54:38 +02:00
Rainer Gerhards
c8ab665951
core: migrate callback invocations to type-safe signatures
Replace opaque/variadic callback usage with explicit, type-safe function
signatures to reduce undefined behavior and clarify intent.
Adapter helpers bridge the existing APIs without raw variadic casts, enabling
the transition incrementally. Callback setup sites are standardized for
consistent readability. This tightens the contract on callbacks, eases future
refactoring, and makes their roles more self-documenting.

Inspired by https://github.com/rsyslog/rsyslog/pull/5882

With AI support: Codex, Gemini
2025-08-01 13:02:10 +02:00
Rainer Gerhards
9b565225bb
maintain ChangeLog 2025-08-01 12:42:45 +02:00
Rainer Gerhards
325b1d3d8d
Merge pull request #5882 from rsyslog/codex/cherry-pick-changes-from-pr-5635
Fix handler call type safety
2025-08-01 12:40:47 +02:00
35710d4716 Fix: Remove unsafe function pointer casting in cfsysline.c
- Replaced function pointer casting with direct handler calls for type safety
- Fixes crashes (BUS errors) on ARM64 macOS 14+ due to strict calling conventions
- Root cause identified by ThreadSanitizer
- Eliminates undefined behavior, improves code safety
2025-08-01 11:49:10 +02:00
Rainer Gerhards
01c5c33896
maintain ChangeLog 2025-08-01 10:18:43 +02:00
Rainer Gerhards
b908b38c95
Merge pull request #5873 from csiltala/openssl-prioritizesan
ossl: Add support for PrioritizeSAN option to OpenSSL network stream driver
2025-08-01 10:16:03 +02:00
Rainer Gerhards
c324ab6c4b
Merge pull request #5806 from rsyslog/fix-imtcp-race-condition
Fix race condition in imtcp when closing sessions
2025-08-01 08:48:44 +02:00
google-labs-jules[bot]
b7a3f4dee3
Fix race condition in imtcp when closing sessions
This commit fixes a race condition that could occur when two threads tried to close the same TCP session simultaneously. This could lead to an "epoll_ctl failed: Bad file descriptor" error message.

The fix introduces an atomic flag `being_closed` to the `tcps_sess_t` struct. This flag is used to ensure that the session-closing logic is executed only once per session.

This commit also corrects the logic of the atomic check to prevent the race condition correctly.
2025-07-31 13:49:15 +02:00
google-labs-jules[bot]
86ff8046e0
Fix race condition in imtcp when closing sessions
This commit fixes a race condition that could occur when two threads tried to close the same TCP session simultaneously. This could lead to an "epoll_ctl failed: Bad file descriptor" error message.

The fix introduces an atomic flag `being_closed` to the `tcps_sess_t` struct. This flag is used to ensure that the session-closing logic is executed only once per session.
2025-07-31 12:55:42 +02:00
Rainer Gerhards
674fe005fa
maintain ChangeLog 2025-07-31 12:50:05 +02:00
Rainer Gerhards
6630a167b4
Merge pull request #5829 from rgerhards/pm3164-headerless
pmrfc3164: add optional headerless‐message detection and handling
2025-07-31 12:47:38 +02:00
Rainer Gerhards
eb2ccd924d
Merge pull request #5879 from rgerhards/action-doxygen
core: improve inline code doc for action.[ch]
2025-07-31 12:46:03 +02:00
Rainer Gerhards
8781fd1885
Merge pull request #5871 from Cropi/imjournal-fmode
imjournal: fix vulnerability in state file creation
2025-07-31 12:45:18 +02:00
Rainer Gerhards
04dba59bcc
core: improve inline code doc for action.[ch]
There are no functional changes in this commit.

With support from AI Agents: Codex
2025-07-31 11:34:02 +02:00
Rainer Gerhards
cf6cd29628
maintain ChangeLog 2025-07-31 10:59:29 +02:00
Rainer Gerhards
06905c75ec
Merge pull request #5878 from rgerhards/i4817
doc fix: remove doc for debug options that no longer exits
2025-07-31 10:58:00 +02:00
Rainer Gerhards
f3d95cc2fa
doc fix: remove doc for debug options that no longer exits
Some debug options were removed several years ago but unfortunately
not removed from the doc. This is now done.

closes: https://github.com/rsyslog/rsyslog/issues/4817
2025-07-31 10:52:44 +02:00