From 0514d7c27245eae57386be4ba1d327c754a42d60 Mon Sep 17 00:00:00 2001 From: Alejandro Gullon Date: Wed, 2 Sep 2026 12:46:04 +0200 Subject: [PATCH] NO-ISSUE: Disable journald rate limiting in logging test The "Case Insensitive Log Levels" test fails on ARM when testing TraceAll because klog verbosity 10 generates ~144K journal messages, exceeding journald's default rate limit of 10K messages per 30 seconds. The suppressed messages include the startup config dump line that the test greps for, making the assertion impossible to satisfy. Instead of globally disabling rate limiting in all test VMs, scope the fix to the logging suite: disable rate limiting in suite setup and re-enable it in teardown. Co-Authored-By: Claude Opus 4.6 (1M context) pre-commit.check-secrets: ENABLED --- test/resources/systemd.resource | 18 ++++++++++++++++++ test/suites/configuration2/logging.robot | 3 +++ 2 files changed, 21 insertions(+) diff --git a/test/resources/systemd.resource b/test/resources/systemd.resource index 1ab890b014..6b25ca71c2 100644 --- a/test/resources/systemd.resource +++ b/test/resources/systemd.resource @@ -85,3 +85,21 @@ Systemctl Daemon Reload ... sudo=True return_stdout=True return_stderr=True return_rc=True Log Many ${stdout} ${stderr} Should Be Equal As Integers 0 ${rc} + +Disable Journal Rate Limiting + [Documentation] Disable journald rate limiting by writing a drop-in that + ... sets RateLimitBurst=0, then restarting the journal service. + ${stdout} ${stderr} ${rc}= Execute Command + ... printf '[Journal]\nRateLimitBurst=0\n' > /etc/systemd/journald.conf.d/disable-ratelimit.conf && systemctl restart systemd-journald + ... sudo=True return_stdout=True return_stderr=True return_rc=True + Log Many ${stdout} ${stderr} + Should Be Equal As Integers 0 ${rc} + +Enable Journal Rate Limiting + [Documentation] Re-enable default journald rate limiting by removing the + ... drop-in created by Disable Journal Rate Limiting. + ${stdout} ${stderr} ${rc}= Execute Command + ... rm -f /etc/systemd/journald.conf.d/disable-ratelimit.conf && systemctl restart systemd-journald + ... sudo=True return_stdout=True return_stderr=True return_rc=True + Log Many ${stdout} ${stderr} + Should Be Equal As Integers 0 ${rc} diff --git a/test/suites/configuration2/logging.robot b/test/suites/configuration2/logging.robot index 7a404d98a1..963ef4a17b 100644 --- a/test/suites/configuration2/logging.robot +++ b/test/suites/configuration2/logging.robot @@ -4,6 +4,7 @@ Documentation Tests for case-insensitive log level parsing Resource ../../resources/common.resource Resource ../../resources/microshift-config.resource Resource ../../resources/microshift-process.resource +Resource ../../resources/systemd.resource Library ../../resources/journalctl.py Suite Setup Setup @@ -29,10 +30,12 @@ Setup Check Required Env Variables Login MicroShift Host Setup Kubeconfig + Disable Journal Rate Limiting Teardown [Documentation] Test suite teardown Remove Drop In MicroShift Config 10-loglevel + Enable Journal Rate Limiting Restart MicroShift Logout MicroShift Host Remove Kubeconfig