Skip to content

Commit 904a51c

Browse files
Merge pull request #374 from pavel-shirshov/pavelsh/teamd
Stop teamd gracefully in both modes
2 parents c7ceafa + 60065e7 commit 904a51c

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

scripts/fast-reboot

+14-4
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,20 @@ docker exec -i bgp pkill -9 bgpd
101101
# Kill lldp, otherwise it sends informotion about reboot
102102
docker kill lldp > /dev/null
103103

104-
# Kill teamd, otherwise it gets down all LAGs
105-
# Note: teamd must be killed before syncd, because it will send the last packet through CPU port
106-
# TODO: stop teamd gracefully to allow teamd to send last valid update to be sure we'll have 90 seconds reboot time
107-
docker kill teamd > /dev/null
104+
# Stop teamd gracefully
105+
if [[ "$REBOOT_TYPE" = "warm-reboot" ]]; then
106+
# Send USR1 signal to all teamd instances to stop them
107+
# It will prepare teamd for warm-reboot
108+
# Note: We must send USR1 signal before syncd, because it will send the last packet through CPU port
109+
docker exec -i teamd pkill -USR1 teamd > /dev/null
110+
fi
111+
112+
if [[ "$REBOOT_TYPE" = "fast-reboot" ]]; then
113+
# Kill teamd, otherwise it gets down all LAGs
114+
# Note: teamd must be killed before syncd, because it will send the last packet through CPU port
115+
# TODO: stop teamd gracefully to allow teamd to send last valid update to be sure we'll have 90 seconds reboot time
116+
docker kill teamd > /dev/null
117+
fi
108118

109119
# Kill swss dockers
110120
docker kill swss

0 commit comments

Comments
 (0)