Skip to content

Commit

Permalink
Merge branch 'master' into v6erspan
Browse files Browse the repository at this point in the history
  • Loading branch information
prsunny authored Oct 4, 2024
2 parents e93819c + 8b99543 commit c8e873e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cfgmgr/portmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,15 @@ void PortMgr::doTask(Consumer &consumer)
}
}

if (!portOk)
{
// Port configuration is handled by the orchagent. If the configuration is written to the APP DB using
// multiple Redis write commands, the orchagent may receive a partial configuration and create a port
// with incorrect settings.
field_values.emplace_back("mtu", mtu);
field_values.emplace_back("admin_status", admin_status);
}

if (field_values.size())
{
writeConfigToAppDb(alias, field_values);
Expand All @@ -201,8 +210,6 @@ void PortMgr::doTask(Consumer &consumer)
{
SWSS_LOG_INFO("Port %s is not ready, pending...", alias.c_str());

writeConfigToAppDb(alias, "mtu", mtu);
writeConfigToAppDb(alias, "admin_status", admin_status);
/* Retry setting these params after the netdev is created */
field_values.clear();
field_values.emplace_back("mtu", mtu);
Expand Down

0 comments on commit c8e873e

Please sign in to comment.