From 00ceb8cbf1e1cdab723156fd38e5558b6d7498f7 Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Wed, 28 Mar 2018 00:49:52 +0000 Subject: [PATCH] [reboot] reduce stop service to only stop syncd When the service dockers are in some rare failure situations, stopping service might get stuck. To make sure reboot always move ahead, we could request syncd to stop, wait some time, then proceed with reboot. --- scripts/reboot | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/scripts/reboot b/scripts/reboot index d349664fb6..382c03d3f6 100755 --- a/scripts/reboot +++ b/scripts/reboot @@ -2,12 +2,9 @@ function stop_sonic_services() { - echo "Stopping sonic services..." - systemctl stop swss - systemctl stop teamd - systemctl stop bgp - systemctl stop lldp - systemctl stop snmp + echo "Stopping syncd..." + docker exec -it syncd /usr/bin/syncd_request_shutdown --cold > /dev/null + sleep 3 } # Obtain our platform as we will mount directories with these names in each docker