Skip to content

Commit

Permalink
[warm/fast reboot] continue executing when killing docker failed (son…
Browse files Browse the repository at this point in the history
…ic-net#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 <ying.xie@microsoft.com>

* mute stderr
  • Loading branch information
yxieca committed Oct 24, 2019
1 parent c12c443 commit c059dc8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/fast-reboot
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit c059dc8

Please sign in to comment.