Fix for System interface for remote asic LAG not getting created if received prior to SYSTEM_LAG creation from Chassis DB #2364
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What I did
Changed interface and neighbor orch code in orchagent which handle updates from Chassis DB for system interface and remote neighbors. Fixes sonic-net/sonic-buildimage#11290
Why I did it
If an update from the Chassis DB for a system interface or a remote neighbor is received prior to receiving an update for the creation of the SYSTEM LAG or SYSTEM_PORT - the current code incorrectly treats this as an update from the local asic and ignores it. As a result the SYSTEM_INTERFACE or the Remote neighbor is not creating when this specific sequence of updates are received.
This change correctly verifies that an update is from the local asic before ignoring it.
How I verified it
Prior to the fix - adding a the system_interface to the Chassis DB before adding the corresponding System LAG would result in the ROUTER_INTERFACE never getting created by SAI. After the fix the ROUTER_INTERFACE is correctly created for this scenario.
The sonic-mgmt supervisor reset tests that were failing prior to this fix - passed after the fix was applied.
Details if related