Skip to content

Commit 220e269

Browse files
authored
[reboot] stop docker service before rebooting (sonic-net#423)
* [reboot] stop docker service before rebooting After upgrading to docker-ce 18.09.0. Shutdown SONiC takes 5-10 minutes waiting for all the running docker containers to quit. They all enventually hit the timeout and caused the huge delay. This is a work-around until proper solution is found. Signed-off-by: Ying Xie <ying.xie@microsoft.com> * [docker] always stop docker on all platforms - add a protection of 30 seconds timeout. Signed-off-by: Ying Xie <ying.xie@microsoft.com>
1 parent 3ce8952 commit 220e269

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/reboot

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ function stop_sonic_services()
1515
docker exec -i syncd /usr/bin/syncd_request_shutdown --cold > /dev/null
1616
sleep 3
1717
fi
18+
19+
# Stop docker service to avoid 5-10 minutes delay in shutdown
20+
# while waiting for existing docker containers to quit.
21+
timeout 30s systemctl stop docker
1822
}
1923

2024
function clear_warm_boot()

0 commit comments

Comments
 (0)