Increase PikeZ varlog size (#13550) (#13750)

Why I did it
To address error sometimes seen when running sonic-mgmt test_stress_routes.py::test_announce_withdraw_route on 720DT-48S

How I did it
Update boot0 logic to set platform specific varlog size for 720DT-48S

How to verify it
Verified that /var/log size increased and error is no longer observed when running test

Co-authored-by: andywongarista <78833093+andywongarista@users.noreply.github.com>
This commit is contained in:
mssonicbld 2023-02-11 01:20:36 +08:00 committed by GitHub
parent 268e866c02
commit d623dd2fca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -469,8 +469,7 @@ write_platform_specific_cmdline() {
local platform="$(cmdline_get platform)"
local sid="$(cmdline_get sid | sed 's/Ssd$//')"
# set varlog size to 100MB
local varlog_size=100
local varlog_size=0
# sonic_mode is set to fixed by default.
sonic_mode="fixed"
@ -545,6 +544,7 @@ write_platform_specific_cmdline() {
fi
if in_array "$sid" "PikeIslandZ" "PikeIslandZ-F" "PikeIslandZ-2F" "PikeIslandZ-R" "PikeIslandZ-2R"; then
aboot_machine=arista_720dt_48s
varlog_size=2048
fi
if [ "$sid" = "BlackhawkT4O" ]; then
aboot_machine=arista_7050px4_32s
@ -635,18 +635,20 @@ write_platform_specific_cmdline() {
read_system_eeprom
fi
if [ $flash_size -ge 28000 ]; then
varlog_size=4096
elif [ $flash_size -gt 4000 ]; then
varlog_size=400
else
varlog_size=256
cmdline_add logs_inram=on
if [ $flash_size -le 2000 ]; then
# enable docker_inram for switches with less than 2G of flash
varlog_size=128
cmdline_add docker_inram=on
fi
if [ $varlog_size -eq 0 ]; then
if [ $flash_size -ge 28000 ]; then
varlog_size=4096
elif [ $flash_size -gt 4000 ]; then
varlog_size=400
else
varlog_size=256
cmdline_add logs_inram=on
if [ $flash_size -le 2000 ]; then
# enable docker_inram for switches with less than 2G of flash
varlog_size=128
cmdline_add docker_inram=on
fi
fi
fi
cmdline_add "varlog_size=$varlog_size"