bmcctld: stop teeing routine logs to /var/log/syslog - #875
Merged
Conversation
EventLogger opened a plain logging.FileHandler on /var/log/syslog, which inside the pmon container resolves to the container's private overlay. Host logrotate cannot see that path and pmon has no cron, so the file grew without bound and persisted across reboots. Every EventLogger method already calls the sonic_py_common.logger base class before touching the file, so these messages reach the host-side rotated syslog through the normal logging path. The file tee was redundant. Drop it rather than adding a RotatingFileHandler, which would mean maintaining a second unrotated file for no additional coverage. log_file is now optional and defaults to None; syslog-only instances get an inert NullHandler. _daemon_logger, PolicyReader, GracefulShutdownHandler and BmcEventHandler switch to syslog only. _event_logger keeps /host/bmc/event.log, which is host-visible and already covered by logrotate (size 10M, rotate 5).
Collaborator
|
/azp run |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Collaborator
|
Hi, there are workflow run(s) waiting for approval, you may be first-time contributor. I will notify maintainers to help approve once PR is approved. Thanks! ---Powered by SONiC BuildBot
|
Collaborator
|
This PR has backport request label(s) for branch(es): msft-202608, but is missing required test information. Please make sure you tick the tested branch(es) in the Tested branch section and provide test evidence (e.g., 202608: <test result>) in the Test result section as well in your PR description. ---Powered by SONiC BuildBot
|
judyjoseph
approved these changes
Aug 14, 2026
Collaborator
|
Cherry-pick PR to msft-202608: Azure/sonic-platform-daemons.msft#83 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why i did it?
Fixes: sonic-net/sonic-buildimage#28982
Fixes: #872
How i did it ?
How to verify?
Description
Motivation and Context
How Has This Been Tested?
Additional Information (Optional)