Skip to content

Commit

Permalink
[teammgrd]: Check if port is enslaved on all conditions (#687)
Browse files Browse the repository at this point in the history
During the warm restart, port is already enslaved in the kernel.
This change is to avoid teammgrd to re-configure those member
ports which causes link flap.

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
  • Loading branch information
Shuotian Cheng authored and lguohan committed Nov 16, 2018
1 parent 75972e7 commit b42710a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cfgmgr/teammgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ void TeamMgr::doPortUpdateTask(Consumer &consumer)
SWSS_LOG_INFO("Received port %s state update", alias.c_str());

string lag;
if (!isPortEnslaved(alias) && findPortMaster(lag, alias))
if (findPortMaster(lag, alias))
{
if (addLagMember(lag, alias) == task_need_retry)
{
Expand Down Expand Up @@ -430,6 +430,13 @@ task_process_status TeamMgr::addLagMember(const string &lag, const string &membe
{
SWSS_LOG_ENTER();

// If port is already enslaved, ignore this operation
// TODO: check the current master if it is the same as to be configured
if (isPortEnslaved(member))
{
return task_ignore;
}

stringstream cmd;
string res;

Expand Down

0 comments on commit b42710a

Please sign in to comment.