From e3c05095f8d3cc611c9730142f0baca82c2e8508 Mon Sep 17 00:00:00 2001 From: jenkins Date: Thu, 21 May 2026 13:26:58 -0300 Subject: [PATCH] logging: trim active pod logs on constrained nodes --- services/logging/scripts/node_log_rotation.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/logging/scripts/node_log_rotation.sh b/services/logging/scripts/node_log_rotation.sh index 774536ce..73f4dd0f 100644 --- a/services/logging/scripts/node_log_rotation.sh +++ b/services/logging/scripts/node_log_rotation.sh @@ -110,6 +110,9 @@ trim_constrained_pod_logs() { continue fi find "${base}/pods" -type f \( -name '[1-9]*.log' -o -name '*.log.20*' \) -size +1M -print -exec truncate -s 0 {} \; 2>/dev/null || true + # Some nodes keep active container logs on tiny zram-backed /var/log. + # Trim noisy live logs before kubelet loses the ability to create pods. + find "${base}/pods" -type f -name '0.log' -size +1M -print -exec truncate -s 1M {} \; 2>/dev/null || true if [ -d "${base}/containers" ]; then find "${base}/containers" -xtype l -print -delete 2>/dev/null || true fi