From 5ac1051f8f02d02769867ee269a891edbc062ca8 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Thu, 27 Apr 2023 02:57:10 +0800 Subject: [PATCH] Temporary WA for the issue that asic_table.json can not be rendered (#13888) (#14857) --- files/build_templates/docker_image_ctl.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/files/build_templates/docker_image_ctl.j2 b/files/build_templates/docker_image_ctl.j2 index c49583a5a05d..92b7b0c6783e 100644 --- a/files/build_templates/docker_image_ctl.j2 +++ b/files/build_templates/docker_image_ctl.j2 @@ -422,6 +422,7 @@ start() { if [[ $? -ne 0 ]] ; then echo "sonic-cfggen failed to render asic_table.json" echo "$(cat errorlog.txt)" + sonic-cfggen -a '{"DEVICE_METADATA":{"localhost":{"platform":"'$PLATFORM'"}}}' -t /usr/share/sonic/templates/asic_table.j2 > /etc/sonic/asic_table.json fi fi if [ ! -f /etc/sonic/peripheral_table.json ] && [ -f /usr/share/sonic/device/$PLATFORM/port_peripheral_config.j2 ]; then @@ -429,6 +430,7 @@ start() { if [[ $? -ne 0 ]] ; then echo "sonic-cfggen failed to render peripheral_table.json" echo "$(cat errorlog.txt)" + sonic-cfggen -a '{"DEVICE_METADATA":{"localhost":{"platform":"'$PLATFORM'"}}}' -t /usr/share/sonic/device/$PLATFORM/port_peripheral_config.j2 > /etc/sonic/peripheral_table.json fi fi if [ ! -f /etc/sonic/zero_profiles.json ] && [ -f /usr/share/sonic/templates/zero_profiles.j2 ]; then @@ -436,6 +438,7 @@ start() { if [[ $? -ne 0 ]] ; then echo "sonic-cfggen failed to render zero_profiles.json" echo "$(cat errorlog.txt)" + sonic-cfggen -t /usr/share/sonic/device/$PLATFORM/zero_profiles.j2 > /etc/sonic/zero_profiles.json fi fi