From 0270cb690215910d2837d91f151222a93e0d6ce7 Mon Sep 17 00:00:00 2001 From: Gorka Eguileor Date: Thu, 20 Jun 2024 20:45:19 +0200 Subject: [PATCH] Reduce api log rotation parameters The log file configured in nova api and nova metadata are only used to pass the data to the log sidecar, which then outputs the data to stdout and then goes to /var/log/pods and/or a centralized logging service. Considering this, there is no need to keep 5 rotated logs, since we'll also have them in the other locations and there is no way to get them without actually going manually into the specific container within the pod. This patch proposes having a single rotated log (because passing 0 as max_logfile_count doesn't work as we want in oslo.log) and reducing the size to rotate from 50MB to 20MB. --- templates/nova.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/nova.conf b/templates/nova.conf index ec342f847..7e19f28fd 100644 --- a/templates/nova.conf +++ b/templates/nova.conf @@ -5,8 +5,8 @@ max_concurrent_live_migrations=1 state_path = /var/lib/nova allow_resize_to_same_host = true # enable log rotation in oslo config by default -max_logfile_count=5 -max_logfile_size_mb=50 +max_logfile_count=1 +max_logfile_size_mb=20 log_rotation_type=size {{if (index . "log_file") }} log_file = {{ .log_file }}