Skip to content

Make the external logging queue discard severity configurable - #1096

Open
quanah wants to merge 1 commit into
ctrliq:mainfrom
quanah:issue1095
Open

quanah wants to merge 1 commit into
ctrliq:mainfrom
quanah:issue1095

Conversation

@quanah

@quanah quanah commented Oct 8, 2026

Copy link
Copy Markdown
SUMMARY

Assisted-by: Claude Opus 5.5. Drafted with AI assistance; the commit carries the same trailer.

construct_rsyslog_conf_template() emits queue.discardSeverity="5" as a literal. Job events and activity stream entries are logged at INFO, so once LOG_AGGREGATOR_LEVEL lets them through and the action queue reaches queue.discardMark, all of them can be dropped, silently, and no setting can change that.

Register LOG_AGGREGATOR_ACTION_QUEUE_DISCARD_SEVERITY (0–8, default 5) and emit it in place of the literal. The default is what Ascender emits today, so existing configurations render byte-identically and test_what_is_discarded_is_the_least_important still holds; 8 disables discarding, at the cost of blocking the sender for queue.timeoutEnqueue when the queue is genuinely full. The setting is also added to the durability test's list of user-visible settings that must reach the queue.

Same change as ansible/awx#16714, ported to Ascender's generator.

related #1095

ISSUE TYPE
  • Bug, Docs Fix or other nominal change
COMPONENT NAME
  • API
ASCENDER VERSION
awx: 25.6.2-235-g640cf5f2
ADDITIONAL INFORMATION

Tests: test_rsyslog_conf_discard_severity in ascender/main/tests/unit/api/test_logger.py, parametrized over the registered default (which must still render 5), 8 and 0; plus one entry in test_the_settings_users_can_set_reach_the_queue (test_external_logging_durability.py), which records the setting as a promise and passes on main too. Run in python:3.14 with Ascender's requirements, as an unprivileged user:

# with this change
$ pytest ascender/main/tests/unit/api/test_logger.py ascender/main/tests/unit/utils/test_external_logging_durability.py
34 passed

# main with only the test changes
2 failed, 32 passed    (the 8 and 0 cases; the default case passes on main, which is the point of including it)

# generated action, LOG_AGGREGATOR_PROTOCOL=tcp, default settings: identical before and after
action(type="omfwd" ... queue.discardMark="117964" queue.discardSeverity="5")

# after, LOG_AGGREGATOR_ACTION_QUEUE_DISCARD_SEVERITY=8
action(type="omfwd" ... queue.discardMark="117964" queue.discardSeverity="8")

# rsyslogd -N1 on rockylinux:9, rsyslog-8.2510.0-2.el9_8.2, with discardSeverity="8": rc=0

ruff check and ruff format --check (ruff 0.16.6, as pinned in tox.ini) are clean on the touched files.

construct_rsyslog_conf_template() emitted queue.discardSeverity="5" as a
literal. Job events and activity stream entries are logged at INFO, so
once LOG_AGGREGATOR_LEVEL lets them through and the action queue reaches
queue.discardMark, all of them are eligible to be dropped, silently, and
no setting could change that.

Register LOG_AGGREGATOR_ACTION_QUEUE_DISCARD_SEVERITY (0-8, default 5)
and emit it in place of the literal. The default is what Ascender emits
today, so existing configurations render byte-identically and the
durability test's "least important first" promise still holds; 8
disables discarding, at the cost of blocking the sender for
queue.timeoutEnqueue when the queue is genuinely full.

related ctrliq#1095

Assisted-by: Claude Opus 5.5
Signed-off-by: Quanah Gibson-Mount <quanah@dropbox.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant