Fix log overflow#162
Conversation
Code Review: Fix log overflowThe approach is sound and follows container best practices. Good overall. Bug / Gap: misc/nginx_no_ssl.conf not updated misc/nginx.conf was correctly updated to redirect logs to /dev/stderr and /dev/stdout, but misc/nginx_no_ssl.conf still has the old file paths: error_log /var/log/nginx/error.log warn; Deployments using the no-SSL config will continue writing to files that no longer exist as a mounted volume. nginx will either fail to start or silently produce no logs. Needs the same update as nginx.conf. Minor: format_message defensive branch is untested and has a type inconsistency In local_disk_space_alert.py line 43: The 'unknown' fallback is never exercised by the test suite and gives the variable an inconsistent int|str type. Since format_message is only called when issues is non-empty (see BaseAlert), this branch is dead code. Either remove it and let it fail loudly (preferred), or add a dedicated test. Nit: LOCAL_DISK_PATH = '/etc/hosts' deserves a clearer comment The real assumption is that /etc/hosts lives on the same partition as Docker's overlay filesystem, which is almost always true in Docker but not guaranteed (e.g. in Kubernetes /etc/hosts is a tmpfs bind-mount). Using '/' directly would be more robust and self-documenting. Observations
Summary:
|
Limit log file growth