Skip to content

Commit

Permalink
Temporary WA for the issue that asic_table.json can not be rendered (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mssonicbld authored Apr 26, 2023
1 parent e0ef5b9 commit 5ac1051
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions files/build_templates/docker_image_ctl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -422,20 +422,23 @@ 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
sonic-cfggen -d -t /usr/share/sonic/device/$PLATFORM/port_peripheral_config.j2 > /etc/sonic/peripheral_table.json 2> errorlog.txt
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
sonic-cfggen -d -t /usr/share/sonic/device/$PLATFORM/zero_profiles.j2 > /etc/sonic/zero_profiles.json 2> errorlog.txt
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

Expand Down

0 comments on commit 5ac1051

Please sign in to comment.