Skip to content

Commit

Permalink
[teamsyncd]: Add information for LAG membership changes (#982)
Browse files Browse the repository at this point in the history
Signed-off-by: Shu0T1an ChenG <[email protected]>
  • Loading branch information
stcheng authored Jul 19, 2019
1 parent 29e5d2d commit 7db25f7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion teamsyncd/teamsync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,15 @@ void TeamSync::removeLag(const string &lagName)
for (auto it : selectable->m_lagMembers)
{
m_lagMemberTable.del(lagName + ":" + it.first);

SWSS_LOG_INFO("Remove member %s before removing LAG %s",
it.first.c_str(), lagName.c_str());
}

/* Delete the LAG */
m_lagTable.del(lagName);

SWSS_LOG_INFO("Remove %s", lagName.c_str());
SWSS_LOG_INFO("Remove LAG %s", lagName.c_str());

/* Return when the team instance hasn't been tracked before */
if (m_teamSelectables.find(lagName) == m_teamSelectables.end())
Expand Down Expand Up @@ -281,6 +284,9 @@ int TeamSync::TeamPortSync::onChange()
FieldValueTuple l("status", it.second ? "enabled" : "disabled");
v.push_back(l);
m_lagMemberTable->set(key, v);

SWSS_LOG_INFO("Set LAG %s member %s with status %s",
m_lagName.c_str(), it.first.c_str(), it.second ? "enabled" : "disabled");
}
}

Expand All @@ -290,6 +296,9 @@ int TeamSync::TeamPortSync::onChange()
{
string key = m_lagName + ":" + it.first;
m_lagMemberTable->del(key);

SWSS_LOG_INFO("Remove member %s from LAG %s",
it.first.c_str(), m_lagName.c_str());
}
}

Expand Down

0 comments on commit 7db25f7

Please sign in to comment.