sonic-swss icon indicating copy to clipboard operation
sonic-swss copied to clipboard

[portsorch] remove port OID from saiOidToAlias map on port deletion

Open stepanblyschak opened this issue 3 years ago • 2 comments

Signed-off-by: Stepan Blyschak [email protected]

What I did

I fixed an issue that on port deletion (port breakout scenario), the port OID is not removed from saiOidToAlias map, resulting in getPort returns true when querying non-existing port OID but the Port structure is not filled with correct values. Also lowered the log level on receiving non-existing port operational status update

Why I did it

To fix errors in the log during breakout:

Oct  4 13:15:45.654396 r-bulldog-04 NOTICE swss#orchagent: :- updatePortOperStatus: Port  oper state set from unknown to down
Oct  4 13:15:45.654773 r-bulldog-04 ERR swss#orchagent: :- set: switch id oid:0x0 doesn't exist
Oct  4 13:15:45.654773 r-bulldog-04 WARNING swss#orchagent: :- setHostIntfsOperStatus: Failed to set operation status DOWN to host interface
Oct  4 13:15:45.654773 r-bulldog-04 ERR swss#orchagent: :- updatePortOperStatus: Failed to set host interface  operational status down
Oct  4 13:15:45.654773 r-bulldog-04 WARNING swss#orchagent: :- flushFDBEntries: Couldn't flush FDB. Bridge port OID: 0x0 bvid:0,

How I verified it

Run UT, run manual port breakout tests.

Details if related

stepanblyschak avatar Oct 05 '22 14:10 stepanblyschak

Request for 202205 and 202111

stepanblyschak avatar Oct 17 '22 16:10 stepanblyschak

@dprital for awareness. @prsunny could you please help to review or suggest someone?

liat-grozovik avatar Oct 18 '22 09:10 liat-grozovik