Skip to content

Commit

Permalink
[rsyslog.j2] fix typo in VAR_LOG_SIZE_KB (sonic-net#9954)
Browse files Browse the repository at this point in the history
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 <stepanb@nvidia.com>
  • Loading branch information
stepanblyschak committed Feb 17, 2022
1 parent f136c53 commit fb752a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/image_config/logrotate/rsyslog.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit fb752a4

Please sign in to comment.