-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Signed-off-by: marian-pritsak <marianp@mellanox.com>
- Loading branch information
There are no files selected for viewing
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 | ||
teamd -f $f -k | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. -k option kills corresponding daemon and deletes LAG interface |
||
done | ||
|
There was a problem hiding this comment.
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/*.