Skip to content

Commit c1d0b96

Browse files
pavel-shirshovlguohan
authored andcommitted
[Fast-reboot]: Gracefully shutdown syncd in fast-reboot (sonic-net#212)
* Gracefully shutdown syncd in fast-reboot * Stopping swss before syncd is not required * Rewrite the check of syncd is still running' * Stop syncd in a graceful way for broadcom platform only
1 parent 5918f67 commit c1d0b96

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

scripts/fast-reboot

+13
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,19 @@ docker kill lldp > /dev/null
5050
# Kill teamd, otherwise it gets down all LAGs
5151
docker kill teamd > /dev/null
5252

53+
# syncd graceful stop is supported only for Broadcoms platforms only for now
54+
if [[ "$sonic_asic_type" = 'broadcom' ]];
55+
then
56+
# Gracefully stop syncd
57+
docker exec -ti syncd /usr/bin/syncd_request_shutdown --cold > /dev/null
58+
59+
# Check that syncd was stopped
60+
while docker top syncd | grep -q /usr/bin/syncd
61+
do
62+
sleep 0.1
63+
done
64+
fi
65+
5366
# Kill other containers to make the reboot faster
5467
docker ps -q | xargs docker kill > /dev/null
5568

0 commit comments

Comments
 (0)