sonic-net / sonic-swss

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

[Chassis][voq] do not synchronize the system interface state if there is no rif assciated with the port #3207

Closed arlakshm closed 1 month ago

arlakshm commented 1 month ago

What I did Fixes: https://github.com/sonic-net/sonic-buildimage/issues/19357

Why I did it In the sonic-mgmt pc test suite. When an empty lag is created. The portchannel changed is sync'ed to the remote LC even if there portchannel has no route interface created. This results in a dummy route interface created on the remote LC.

So when the empty port channel is removed on the local card, the removal fails in the remote LC because of the dummy route interface.

Add a fix to sync the portchannel interface state to the remote LC only when there routeinterface is created on the local LC.

How I verified it Run sonic-mgmt failed PC tests on chassis

pc/test_po_update.py::test_po_update_io_no_loss[str2-sonic-lc5-1-0] PASSED 
pc/test_po_update.py::test_po_update[str2-sonic-lc5-1-1] PASSED           
pc/test_po_update.py::test_po_update_io_no_loss[str2-sonic-lc5-1-1] PASSED 
pc/test_po_update.py::test_po_update[str2-sonic-lc3-1-None] PASSED        
pc/test_po_update.py::test_po_update_io_no_loss[str2-sonic-lc3-1-None] PASSED 

Details if related

arlakshm commented 1 month ago

@saksarav-nokia, fyi..

abdosi commented 1 month ago

@yxieca : can you help cherry-pick into 202205

mssonicbld commented 2 weeks ago

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