Skip to content

Commit

Permalink
[reboot scripts] remove -t option in docker exec commands (#228)
Browse files Browse the repository at this point in the history
When the command is called by ssh execution, there is no shell. With
-t option these docker commands will fail.

ssh execution: e.g. ssh admin@dut "sudo /usr/bin/fast-reboot"
  • Loading branch information
yxieca authored Mar 31, 2018
1 parent ed432fc commit 68c3fbf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions scripts/fast-reboot
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ mkdir -p /host/fast-reboot
/usr/bin/fast-reboot-dump.py -t /host/fast-reboot

# Kill bgpd to start the bgp graceful restart procedure
docker exec -ti bgp killall -9 zebra
docker exec -ti bgp killall -9 bgpd
docker exec -i bgp killall -9 zebra
docker exec -i bgp killall -9 bgpd

# Kill lldp, otherwise it sends informotion about reboot
docker kill lldp > /dev/null
Expand All @@ -54,7 +54,7 @@ docker kill teamd > /dev/null
if [[ "$sonic_asic_type" = 'broadcom' ]];
then
# Gracefully stop syncd
docker exec -ti syncd /usr/bin/syncd_request_shutdown --cold > /dev/null
docker exec -i syncd /usr/bin/syncd_request_shutdown --cold > /dev/null

# Check that syncd was stopped
while docker top syncd | grep -q /usr/bin/syncd
Expand Down
2 changes: 1 addition & 1 deletion scripts/reboot
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
function stop_sonic_services()
{
echo "Stopping syncd..."
docker exec -it syncd /usr/bin/syncd_request_shutdown --cold > /dev/null
docker exec -i syncd /usr/bin/syncd_request_shutdown --cold > /dev/null
sleep 3
}

Expand Down

0 comments on commit 68c3fbf

Please sign in to comment.