From e5e1b709669cb890e183b6ac2a556e3e576f3324 Mon Sep 17 00:00:00 2001 From: Stepan Blyshchak <38952541+stepanblyschak@users.noreply.github.com> Date: Thu, 17 Feb 2022 10:16:44 +0200 Subject: [PATCH] [rsyslog.j2] fix typo in VAR_LOG_SIZE_KB (#9954) This issue causes negative threshold value and thus deleting log files even when there is enough space. This issue causes negative threshold value and thus deleting log files even when there is enough space. - Why I did it To fix an issue when log files get deleted even if there is enough space. - How I did it Fixed an typo. - How to verify it Run the portion of the script that calculates threshold, see that the threshold is calculated correctly. Signed-off-by: Stepan Blyschak --- files/image_config/logrotate/rsyslog.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/image_config/logrotate/rsyslog.j2 b/files/image_config/logrotate/rsyslog.j2 index dd360dc860..1a5c92c338 100644 --- a/files/image_config/logrotate/rsyslog.j2 +++ b/files/image_config/logrotate/rsyslog.j2 @@ -57,7 +57,7 @@ # should be disabled, just in case they get created and rotated RESERVED_SPACE_KB=4096 - VARL_LOG_SIZE_KB={{var_log_kb}} + VAR_LOG_SIZE_KB={{var_log_kb}} # Limit usable space to 90% of the partition minus the reserved space for other logs USABLE_SPACE_KB=$(( (VAR_LOG_SIZE_KB * 90 / 100) - RESERVED_SPACE_KB))