chore: Make sure each container / pod has its own stdout log files#36205
chore: Make sure each container / pod has its own stdout log files#36205nidhi-nair merged 3 commits intoreleasefrom
Conversation
WalkthroughThe pull request introduces enhancements to the Changes
Possibly related PRs
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- deploy/docker/fs/etc/supervisor/supervisord.conf (1 hunks)
Additional context used
Learnings (2)
Common learnings
Learnt from: sharat87 PR: appsmithorg/appsmith#30252 File: deploy/docker/fs/usr/lib/python3/dist-packages/supervisor/appsmith_supervisor_stdout.py:21-29 Timestamp: 2024-01-12T01:41:30.885Z Learning: The user has confirmed that the suggested changes to handle potential exceptions and improve the robustness of the `main` function in `appsmith_supervisor_stdout.py` are acceptable.deploy/docker/fs/etc/supervisor/supervisord.conf (1)
Learnt from: sharat87 PR: appsmithorg/appsmith#30252 File: deploy/docker/fs/usr/lib/python3/dist-packages/supervisor/appsmith_supervisor_stdout.py:21-29 Timestamp: 2024-01-12T01:41:30.885Z Learning: The user has confirmed that the suggested changes to handle potential exceptions and improve the robustness of the `main` function in `appsmith_supervisor_stdout.py` are acceptable.
Additional comments not posted (6)
deploy/docker/fs/etc/supervisor/supervisord.conf (6)
42-42: Ensure environment variable usage is secure and validated.The use of environment variables in the log file path (
%(ENV_APPSMITH_LOG_DIR)s/supervisor/access-supervisor-%(ENV_HOSTNAME)s.log) is a common practice to allow dynamic configuration. However, ensure that these environment variables are properly validated and sanitized to prevent potential security issues, such as directory traversal attacks.
43-43: Confirm environment variable consistency and security.Similar to the stdout log file, the stderr log file path uses environment variables (
%(ENV_APPSMITH_LOG_DIR)s/supervisor/error-supervisor-%(ENV_HOSTNAME)s.log). It's crucial to ensure that these variables are consistently set across different deployment environments and are secured against unauthorized modifications.
44-44: Review the log file size limit configuration.Setting
stdout_logfile_maxbytes=10MBis intended to manage the size of log files effectively. Confirm that this size limit aligns with the operational requirements and storage capabilities of the deployment environment. Additionally, consider the implications of this setting on log rotation and archival strategies.
45-45: Check stderr log file size configuration.The configuration for
stderr_logfile_maxbytes=10MBmirrors that of stdout. It's important to ensure that this setting is appropriate for the expected volume of error logs and does not lead to unexpected disk space issues.
46-46: Validate the backup configuration for stdout logs.The setting
stdout_logfile_backups=10specifies the number of backup files to retain. Verify that this number is suitable for your logging needs and storage limits, and consider how it integrates with your overall log management policy.
47-47: Ensure stderr log backups are appropriately configured.Similarly,
stderr_logfile_backups=10needs to be assessed to ensure it meets the operational and storage requirements of the system. This setting should be consistent with the policies for managing stdout log backups.
Description
Log files from stdout, when undefined were defaulting to the supervisord child dir random fd paths. These files got deleted on supervisor process restarts, which meant that successive rollouts would always end up with stale file handles. We're now providing a deterministic path for these logs as well, rolled over and backed up similar to other files.
Warning
Tests have not run on the HEAD 5f99008 yet
Mon, 09 Sep 2024 16:07:19 UTC
Summary by CodeRabbit