Skip to content

Commit

Permalink
[reboot]: Fix reload flow for Mellanox platforms (sonic-net#418)
Browse files Browse the repository at this point in the history
* Don't send "syncd_request_shutdown" event for "cold" reboot on Mellanox platforms

Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
  • Loading branch information
Volodymyr Samotiy authored and lguohan committed Dec 14, 2018
1 parent fa2894b commit 1d20e14
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/reboot
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
REBOOT_USER=$(logname)
REBOOT_TIME=$(date)
PLATFORM=$(sonic-cfggen -H -v DEVICE_METADATA.localhost.platform)
ASIC_TYPE=$(sonic-cfggen -y /etc/sonic/sonic_version.yml -v asic_type)
DEVPATH="/usr/share/sonic/device"
PLAT_REBOOT="platform_reboot"
REBOOT_CAUSE_FILE="/var/cache/sonic/reboot-cause.txt"

function stop_sonic_services()
{
echo "Stopping syncd process..."
docker exec -i syncd /usr/bin/syncd_request_shutdown --cold > /dev/null
sleep 3
if [[ x"$ASIC_TYPE" != x"mellanox" ]]; then
echo "Stopping syncd process..."
docker exec -i syncd /usr/bin/syncd_request_shutdown --cold > /dev/null
sleep 3
fi
}

function clear_warm_boot()
Expand Down

0 comments on commit 1d20e14

Please sign in to comment.