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

[docker-teamd]: Refactor cleanup procedure. #441

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
[docker-teamd]: Check if teamd directory is not empty
Signed-off-by: marian-pritsak <marianp@mellanox.com>
  • Loading branch information
marian-pritsak committed Apr 27, 2017
commit b1a12cba52010fe2991660f8cab3da9a0957fbca
4 changes: 2 additions & 2 deletions dockers/docker-teamd/start.sh
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
TEAMD_CONF_PATH=/etc/teamd

function start_app {
if [ -d $TEAMD_CONF_PATH ]; then
if [ "$(ls $TEAMD_CONF_PATH)" ]; then
for f in $TEAMD_CONF_PATH/*; do
teamd -f $f -d
done
@@ -14,7 +14,7 @@ function start_app {
}

function clean_up {
if [ -d $TEAMD_CONF_PATH ]; then
if [ "$(ls $TEAMD_CONF_PATH)" ]; then
for f in $TEAMD_CONF_PATH/*; do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check if the folder is empty or not. if the folder is empty, the variable f will become /etc/teamd/*.

teamd -f $f -k
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I believe this will successfully stop all the team instances without leaving anything that needs to be manually cleaned up after the next docker starts?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-k option kills corresponding daemon and deletes LAG interface

done