From 13ec6006b976afe87a3feb88126f9d0e15a08a5f Mon Sep 17 00:00:00 2001 From: andywongarista <78833093+andywongarista@users.noreply.github.com> Date: Thu, 9 Feb 2023 13:24:09 -0800 Subject: [PATCH] Increase PikeZ varlog size (#13550) 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 --- files/Aboot/boot0.j2 | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/files/Aboot/boot0.j2 b/files/Aboot/boot0.j2 index 5bf21b89b63f..de7bfc3d662f 100644 --- a/files/Aboot/boot0.j2 +++ b/files/Aboot/boot0.j2 @@ -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" @@ -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 @@ -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"