Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 6 additions & 0 deletions cfgmgr/intfmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "shellcmd.h"
#include "macaddress.h"
#include "warm_restart.h"
#include <swss/redisutility.h>

using namespace std;
using namespace swss;
Expand Down Expand Up @@ -438,6 +439,11 @@ bool IntfMgr::isIntfStateOk(const string &alias)
}
else if (m_statePortTable.get(alias, temp))
{
auto state_opt = swss::fvsGetValue(temp, "state", true);
if (!state_opt)
{
return false;
}
SWSS_LOG_DEBUG("Port %s is ready", alias.c_str());
return true;
}
Expand Down
7 changes: 7 additions & 0 deletions cfgmgr/portmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "portmgr.h"
#include "exec.h"
#include "shellcmd.h"
#include <swss/redisutility.h>

using namespace std;
using namespace swss;
Expand Down Expand Up @@ -87,6 +88,12 @@ bool PortMgr::isPortStateOk(const string &alias)

if (m_statePortTable.get(alias, temp))
{
auto state_opt = swss::fvsGetValue(temp, "state", true);
if (!state_opt)
{
return false;
}

SWSS_LOG_INFO("Port %s is ready", alias.c_str());
return true;
}
Expand Down
8 changes: 8 additions & 0 deletions cfgmgr/teammgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "tokenize.h"
#include "warm_restart.h"
#include "portmgr.h"
#include <swss/redisutility.h>

#include <algorithm>
#include <iostream>
Expand Down Expand Up @@ -72,6 +73,13 @@ bool TeamMgr::isPortStateOk(const string &alias)
return false;
}

auto state_opt = swss::fvsGetValue(temp, "state", true);
if (!state_opt)
{
SWSS_LOG_INFO("Port %s is not ready", alias.c_str());
return false;
}

return true;
}

Expand Down