[action] [PR:15821] update rsyslog log size conf #15845
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why I did it
For some devices whose log folder size is larger than 200M, for example, 256M, the LOG_FILE_ROTATE_SIZE_KB should be 16M. and
THRESHOLD_KB=$((USABLE_SPACE_KB - (NUM_LOGS_TO_ROTATE LICENSE MAINTAINERS Makefile Makefile.cache Makefile.work README.buildsystem.md README.md ThirdPartyLicenses.txt azure-pipelines.yml build_debian.sh build_debug_docker_j2.sh build_docker.sh build_image.sh check_install.py device dockers files functions.sh get_docker-base.sh install_sonic.py installer onie-image-arm64.conf onie-image-armhf.conf onie-image.conf onie-mk-demo.sh platform push_docker.sh rules scripts slave.mk sonic-slave-bullseye sonic-slave-buster sonic-slave-jessie sonic-slave-stretch src update_screen.sh LOG_FILE_ROTATE_SIZE_KB LICENSE MAINTAINERS Makefile Makefile.cache Makefile.work README.buildsystem.md README.md ThirdPartyLicenses.txt azure-pipelines.yml build_debian.sh build_debug_docker_j2.sh build_docker.sh build_image.sh check_install.py device dockers files functions.sh get_docker-base.sh install_sonic.py installer onie-image-arm64.conf onie-image-armhf.conf onie-image.conf onie-mk-demo.sh platform push_docker.sh rules scripts slave.mk sonic-slave-bullseye sonic-slave-buster sonic-slave-jessie sonic-slave-stretch src update_screen.sh 2)))
= $(( (VAR_LOG_SIZE_KB LICENSE MAINTAINERS Makefile Makefile.cache Makefile.work README.buildsystem.md README.md ThirdPartyLicenses.txt azure-pipelines.yml build_debian.sh build_debug_docker_j2.sh build_docker.sh build_image.sh check_install.py device dockers files functions.sh get_docker-base.sh install_sonic.py installer onie-image-arm64.conf onie-image-armhf.conf onie-image.conf onie-mk-demo.sh platform push_docker.sh rules scripts slave.mk sonic-slave-bullseye sonic-slave-buster sonic-slave-jessie sonic-slave-stretch src update_screen.sh 90 / 100) - RESERVED_SPACE_KB)) - (NUM_LOGS_TO_ROTATE LICENSE MAINTAINERS Makefile Makefile.cache Makefile.work README.buildsystem.md README.md ThirdPartyLicenses.txt azure-pipelines.yml build_debian.sh build_debug_docker_j2.sh build_docker.sh build_image.sh check_install.py device dockers files functions.sh get_docker-base.sh install_sonic.py installer onie-image-arm64.conf onie-image-armhf.conf onie-image.conf onie-mk-demo.sh platform push_docker.sh rules scripts slave.mk sonic-slave-bullseye sonic-slave-buster sonic-slave-jessie sonic-slave-stretch src update_screen.sh LOG_FILE_ROTATE_SIZE_KB LICENSE MAINTAINERS Makefile Makefile.cache Makefile.work README.buildsystem.md README.md ThirdPartyLicenses.txt azure-pipelines.yml build_debian.sh build_debug_docker_j2.sh build_docker.sh build_image.sh check_install.py device dockers files functions.sh get_docker-base.sh install_sonic.py installer onie-image-arm64.conf onie-image-armhf.conf onie-image.conf onie-mk-demo.sh platform push_docker.sh rules scripts slave.mk sonic-slave-bullseye sonic-slave-buster sonic-slave-jessie sonic-slave-stretch src update_screen.sh 2)))
= $(( (256M LICENSE MAINTAINERS Makefile Makefile.cache Makefile.work README.buildsystem.md README.md ThirdPartyLicenses.txt azure-pipelines.yml build_debian.sh build_debug_docker_j2.sh build_docker.sh build_image.sh check_install.py device dockers files functions.sh get_docker-base.sh install_sonic.py installer onie-image-arm64.conf onie-image-armhf.conf onie-image.conf onie-mk-demo.sh platform push_docker.sh rules scripts slave.mk sonic-slave-bullseye sonic-slave-buster sonic-slave-jessie sonic-slave-stretch src update_screen.sh 90 / 100) - 4096)) - (8 LICENSE MAINTAINERS Makefile Makefile.cache Makefile.work README.buildsystem.md README.md ThirdPartyLicenses.txt azure-pipelines.yml build_debian.sh build_debug_docker_j2.sh build_docker.sh build_image.sh check_install.py device dockers files functions.sh get_docker-base.sh install_sonic.py installer onie-image-arm64.conf onie-image-armhf.conf onie-image.conf onie-mk-demo.sh platform push_docker.sh rules scripts slave.mk sonic-slave-bullseye sonic-slave-buster sonic-slave-jessie sonic-slave-stretch src update_screen.sh 16M LICENSE MAINTAINERS Makefile Makefile.cache Makefile.work README.buildsystem.md README.md ThirdPartyLicenses.txt azure-pipelines.yml build_debian.sh build_debug_docker_j2.sh build_docker.sh build_image.sh check_install.py device dockers files functions.sh get_docker-base.sh install_sonic.py installer onie-image-arm64.conf onie-image-armhf.conf onie-image.conf onie-mk-demo.sh platform push_docker.sh rules scripts slave.mk sonic-slave-bullseye sonic-slave-buster sonic-slave-jessie sonic-slave-stretch src update_screen.sh 2)))
the result would be a negative value
Work item tracking
24524827
How I did it
Add a case for 400M, if the log folder size is between 200M and 400M, set the log file size to 2M
How to verify it
Do cmd "sudo logrotate -f /etc/logrotate.conf" on DUT which val/log folder size is 256M, and check the syslog.
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)