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
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
Details if related