Skip to content

Commit

Permalink
portsorch: don't call updateDbPortOperStatus on all port types
Browse files Browse the repository at this point in the history
PORT_TABLE contains PortChannel oper_status entries which are not
expected by portsorch which leads to warm/fastreboot failures
like:
```
2025 Feb 10 09:33:07.111055 sonic NOTICE swss#orchagent: :- bake: foundPortConfigDone = 1
2025 Feb 10 09:33:07.111080 sonic NOTICE swss#orchagent: :- bake: foundPortInitDone = 1
2025 Feb 10 09:33:07.111395 sonic NOTICE swss#orchagent: :- bake: m_portTable->getKeys 263
2025 Feb 10 09:33:07.111403 sonic NOTICE swss#orchagent: :- bake: portCount = 257, m_portCount = 0
2025 Feb 10 09:33:07.111403 sonic ERR swss#orchagent: :- bake: Invalid port table: portCount, expecting 257, got 261
```

Fixes #21688

Signed-off-by: Brad House (@bradh352)
  • Loading branch information
bradh352 committed Feb 10, 2025
1 parent 515af60 commit 5172cec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8268,7 +8268,10 @@ void PortsOrch::updatePortOperStatus(Port &port, sai_port_oper_status_t status)
return;
}

updateDbPortOperStatus(port, status);
if (port.m_type == Port::PHY || port.m_type == Port::TUNNEL)
{
updateDbPortOperStatus(port, status);
}

if (port.m_type == Port::PHY)
{
Expand Down

0 comments on commit 5172cec

Please sign in to comment.