sonic-net / sonic-swss

SONiC Switch State Service (SwSS)
https://azure.github.io/SONiC
Other
170 stars 503 forks source link

Add a check if OID exists before setting Host Tx Ready Signal Enable #3232

Closed noaOrMlnx closed 1 month ago

noaOrMlnx commented 1 month ago

What I did I added a query before setting host tx ready - must check that Oid exists before setting attribute to SAI.

Why I did it

When we do dynamic port breakout to a Fw-control port, portsorch receives a notification that something was deleted in TRANSCEIVER_INFO table from State DB, and tries to set HOST_TX_READY_SIGNAL_ENABLE attribute to false for the deleted OID. The issue is the Oid is already deleted and we receive an error from SAI.

How I verified it Run DPB on the switch Details if related

noaOrMlnx commented 1 month ago

@prgeor can you please review this host_tx_ready fix?

prgeor commented 1 month ago

@noaOrMlnx Why OA is acting upon deleted ports?

prsunny commented 1 month ago

@prgeor , can you please approve?

noaOrMlnx commented 1 month ago

@prgeor OA is acting upon port deletion, if a module was plugged out, and its entry was deleted from TRANSCEIVER_INFO table is State DB, so it could set HostTxReady enable to false. In DPB case, the port OID is deleted, and we can't set any attribute to SAI.

bingwang-ms commented 3 weeks ago

Please fix the conflict to 202311 branch.

mssonicbld commented 3 weeks ago

Cherry-pick PR to 202405: https://github.com/sonic-net/sonic-swss/pull/3243