From c059dc82e80fcf543f46a93c2c52478d3311ee6b Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Thu, 24 Oct 2019 16:51:39 -0700 Subject: [PATCH] [warm/fast reboot] continue executing when killing docker failed (#713) * [warm/fast reboot] continue executing when killing docker failed After killing bgpd, the execution has passed point of safe return. We need to proceed and ignore any trivial failures. Signed-off-by: Ying Xie * mute stderr --- scripts/fast-reboot | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/fast-reboot b/scripts/fast-reboot index e16e11f068e8..e59f3dcbb5b2 100755 --- a/scripts/fast-reboot +++ b/scripts/fast-reboot @@ -414,7 +414,7 @@ debug "Stopped bgp ..." # We call `docker kill lldp` to ensure the container stops as quickly as possible, # then immediately call `systemctl stop lldp` to prevent the service from # restarting the container automatically. -docker kill lldp > /dev/null +docker kill lldp &> /dev/null || debug "Docker lldp is not running ($?) ..." systemctl stop lldp if [[ "$REBOOT_TYPE" = "fast-reboot" ]]; then @@ -428,7 +428,7 @@ if [[ "$REBOOT_TYPE" = "fast-reboot" ]]; then while docker exec -i teamd pgrep teamd > /dev/null; do sleep 0.05 done - docker kill teamd > /dev/null + docker kill teamd &> /dev/null || debug "Docker teamd is not running ($?) ..." systemctl stop teamd debug "Stopped teamd ..." fi @@ -437,7 +437,7 @@ fi # We call `docker kill swss` to ensure the container stops as quickly as possible, # then immediately call `systemctl stop swss` to prevent the service from # restarting the container automatically. -docker kill swss > /dev/null +docker kill swss &> /dev/null || debug "Docker swss is not running ($?) ..." systemctl stop swss # Pre-shutdown syncd