-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[action] [PR:15821] update rsyslog log size conf #16325
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 * LOG_FILE_ROTATE_SIZE_KB * 2))) = $(( (VAR_LOG_SIZE_KB * 90 / 100) - RESERVED_SPACE_KB)) - (NUM_LOGS_TO_ROTATE * LOG_FILE_ROTATE_SIZE_KB * 2))) = $(( (256M * 90 / 100) - 4096)) - (8 * 16M * 2))) the result would be a negative value Work item tracking Microsoft ADO (number only): 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.
11 tasks
Original PR: #15821 |
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
lipxu
approved these changes
Aug 30, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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)