Skip to content

[teamd] Fix tlm_teamd miss killed issue during stopping container #8007

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions files/scripts/teamd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ stop() {
# Send USR1 signal to all teamd instances to stop them
# It will prepare teamd for warm-reboot
# Note: We must send USR1 signal before syncd, because it will send the last packet through CPU port
docker exec -i ${SERVICE}$DEV pkill -USR1 ${SERVICE} > /dev/null || [ $? == 1 ]
docker exec -i ${SERVICE}$DEV pkill -USR1 -x ${SERVICE} > /dev/null || [ $? == 1 ]
elif [[ x"$FAST_BOOT" == x"true" ]]; then
# Kill teamd processes inside of teamd container with SIGUSR2 to allow them to send last LACP frames
# We call `docker kill teamd` to ensure the container stops as quickly as possible,
# Note: teamd must be killed before syncd, because it will send the last packet through CPU port
docker exec -i ${SERVICE}$DEV pkill -USR2 ${SERVICE} || [ $? == 1 ]
while docker exec -i ${SERVICE}$DEV pgrep ${SERVICE} > /dev/null; do
docker exec -i ${SERVICE}$DEV pkill -USR2 -x ${SERVICE} || [ $? == 1 ]
while docker exec -i ${SERVICE}$DEV pgrep -x ${SERVICE} > /dev/null; do
sleep 0.05
done
docker kill ${SERVICE}$DEV &> /dev/null || debug "Docker ${SERVICE}$DEV is not running ($?) ..."
Expand Down