From fd95ab1afc3b784391ed3686138122f000a5d290 Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Tue, 28 Jan 2020 02:17:06 +0000 Subject: [PATCH 1/2] [team sync/mgr] Add debug message before cleaning up LAGs These functions are called only once in the time of service stopping, add events will help debug. And these messages won't be chatty. Signed-off-by: Ying Xie --- cfgmgr/teammgr.cpp | 1 + teamsyncd/teamsync.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/cfgmgr/teammgr.cpp b/cfgmgr/teammgr.cpp index 2120ab033f..88c8ce03c9 100644 --- a/cfgmgr/teammgr.cpp +++ b/cfgmgr/teammgr.cpp @@ -163,6 +163,7 @@ void TeamMgr::cleanTeamProcesses(int signo) { pid_t pid = 0; + SWSS_LOG_NOTICE("Cleaning up LAGs during shutdown..."); for (const auto& it: m_lagList) { pid = m_lagPIDList[it]; diff --git a/teamsyncd/teamsync.cpp b/teamsyncd/teamsync.cpp index 2719189f8e..4fb88b4723 100644 --- a/teamsyncd/teamsync.cpp +++ b/teamsyncd/teamsync.cpp @@ -212,6 +212,8 @@ void TeamSync::removeLag(const string &lagName) void TeamSync::cleanTeamSync() { + SWSS_LOG_NOTICE("Cleaning up kernel LAGs ..."); + for (const auto& it: m_teamSelectables) { /* Cleanup LAG */ From aa9fa9555b609b273b34f87e99d2ca7a38843927 Mon Sep 17 00:00:00 2001 From: Ying Xie Date: Thu, 6 Feb 2020 22:32:13 +0000 Subject: [PATCH 2/2] Update log messages and adding SWSS_LOG_ENTER() --- cfgmgr/teammgr.cpp | 1 + teamsyncd/teamsync.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cfgmgr/teammgr.cpp b/cfgmgr/teammgr.cpp index 88c8ce03c9..4266688e59 100644 --- a/cfgmgr/teammgr.cpp +++ b/cfgmgr/teammgr.cpp @@ -163,6 +163,7 @@ void TeamMgr::cleanTeamProcesses(int signo) { pid_t pid = 0; + SWSS_LOG_ENTER(); SWSS_LOG_NOTICE("Cleaning up LAGs during shutdown..."); for (const auto& it: m_lagList) { diff --git a/teamsyncd/teamsync.cpp b/teamsyncd/teamsync.cpp index 4fb88b4723..2102d070bd 100644 --- a/teamsyncd/teamsync.cpp +++ b/teamsyncd/teamsync.cpp @@ -212,7 +212,8 @@ void TeamSync::removeLag(const string &lagName) void TeamSync::cleanTeamSync() { - SWSS_LOG_NOTICE("Cleaning up kernel LAGs ..."); + SWSS_LOG_ENTER(); + SWSS_LOG_NOTICE("Cleaning up LAG teamd resources ..."); for (const auto& it: m_teamSelectables) {