Skip to content

Commit

Permalink
Increase PikeZ varlog size (#13550)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
andywongarista authored and pull[bot] committed May 12, 2024
1 parent bf2bc8d commit 13ec600
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions files/Aboot/boot0.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -544,6 +543,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
Expand Down Expand Up @@ -640,18 +640,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"
Expand Down

0 comments on commit 13ec600

Please sign in to comment.