Skip to content
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

[teamd]: Update the start.sh script to clean up the teamd docker state #351

Merged
merged 1 commit into from
Mar 2, 2017
Merged
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
8 changes: 8 additions & 0 deletions dockers/docker-teamd/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@

TEAMD_CONF_PATH=/etc/teamd

# Before teamd could automatically add newly created host interfaces into the
# LAG, this workaround will be needed. It will remove the obsolete files and
# net devices that are failed to be removed in the previous run.
function start_app {
# Remove *.pid and *.sock files if there are any
rm -f /var/run/teamd/*
if [ -d $TEAMD_CONF_PATH ]; then
for f in $TEAMD_CONF_PATH/*; do
# Remove netdevs if there are any
intf=`echo $f | awk -F'[/.]' '{print $4}'`
ip link del $intf
teamd -f $f -d
done
fi
Expand Down