From bc61a7027b1927f7304c9809798314022ef42aa4 Mon Sep 17 00:00:00 2001 From: Stepan Blyshchak <38952541+stepanblyschak@users.noreply.github.com> Date: Tue, 24 May 2022 13:03:39 +0300 Subject: [PATCH] Revert "Revert "[scripts/fast-reboot] Shutdown remaining containers through systemd (#2133)" (#2161)" This reverts commit 288c2d8d932899c71c34d360983cee640a9694fd. --- scripts/fast-reboot | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/scripts/fast-reboot b/scripts/fast-reboot index 593bca8e95..2942c8ba23 100755 --- a/scripts/fast-reboot +++ b/scripts/fast-reboot @@ -748,26 +748,6 @@ for service in ${SERVICES_TO_STOP}; do fi done -# Kill other containers to make the reboot faster -# We call `docker kill ...` to ensure the container stops as quickly as possible, -# then immediately call `systemctl stop ...` to prevent the service from -# restarting the container automatically. -debug "Stopping all remaining containers ..." -if test -f /usr/local/bin/ctrmgr_tools.py -then - /usr/local/bin/ctrmgr_tools.py kill-all -else - for CONTAINER_NAME in $(docker ps --format '{{.Names}}'); do - CONTAINER_STOP_RC=0 - docker kill $CONTAINER_NAME &> /dev/null || CONTAINER_STOP_RC=$? - systemctl stop $CONTAINER_NAME || debug "Ignore stopping $CONTAINER_NAME error $?" - if [[ CONTAINER_STOP_RC -ne 0 ]]; then - debug "Failed killing container $CONTAINER_NAME RC $CONTAINER_STOP_RC ." - fi - done -fi -debug "Stopped all remaining containers ..." - # Stop the docker container engine. Otherwise we will have a broken docker storage systemctl stop docker.service || debug "Ignore stopping docker service error $?"