[VRF]Fixing vrf orch to update state_db when evpn nvo arrives late #41
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
Update state_db VRF_OBJECT table when there is update flow in the Vrf.
Since there is no EVPN nvo the addOperation returns here without updating state_db
https://github.com/sonic-net/sonic-swss/blob/2e6c5b209d575f73b867de9f3e56b3be4066acec/orchagent/vrforch.cpp#L114
However later when evpn nvo arrives there is no subsequent update operation.
This will result in removal message not getting processed due to the check in vrfmgrd
https://github.com/sonic-net/sonic-swss/blob/a821af0421de316555146615cffd4108ec566e20/cfgmgr/vrfmgr.cpp#L208
Why I did it
The update is missed when VRF is created and vni is set on the VRF but EVPN nvo arrives late.
How I verified it
Added UT to verify the flow
Details if related