[action] [PR:4674] [fdbsyncd]: Make VXLAN FDB delete idempotent#247
Merged
Conversation
#### What I did Make duplicate VXLAN FDB delete handling idempotent in `fdbsyncd` by lowering the missing-entry path in `FdbSync::macDelVxlan()` from error-level logging to info-level logging. This fixes the regression introduced by PR #4615 where an expected later kernel delete for a VXLAN FDB entry could log: ```text macDelVxlan: DEL_KEY <key> entry doesn't exist ``` That message was treated as a syslog error by loganalyzer in `sonic-buildimage` PR sonic-net/sonic-buildimage#27663, causing `vxlan/test_vxlan_decap.py::test_vxlan_decap[Enabled]` to fail even though the VXLAN decap dataplane test body passed. #### Why I did it When a remote/VXLAN-learned MAC is replaced by a local MAC, `updateLocalMac()` intentionally removes the entry from the VXLAN FDB cache. A later kernel delete event for the same VXLAN FDB entry is expected and should be a no-op, not an error. Before PR #4615, this missing-cache-entry delete path was silently ignored. This change restores the idempotent behavior while still leaving an info-level trace for debugging. #### How I did it - Changed the missing-entry log in `FdbSync::macDelVxlan()` from `SWSS_LOG_ERROR` to `SWSS_LOG_INFO`. - Extended the existing `TestMacDelVxlan` C++/GMock test to call `macDelVxlan()` twice and verify the cache remains empty after the duplicate delete. #### How I verified it Validated from `sonic-buildimage` using the official SONiC bookworm slave build flow: ```bash BLDENV=bookworm SONIC_BUILD_JOBS=4 make -f Makefile.work target/debs/bookworm/swss_1.0.0_amd64.deb-clean BLDENV=bookworm SONIC_BUILD_JOBS=4 make -f Makefile.work target/debs/bookworm/swss_1.0.0_amd64.deb ``` Results from `target/debs/bookworm/swss_1.0.0_amd64.deb.log`: - `swss_1.0.0_amd64.deb` built successfully. - `dh_auto_test` ran. - `orchagent/p4orch/tests`: 770 passed, 3 skipped, 0 failed, 0 errors. - `tests/mock_tests`: 1071 passed, 1 skipped, 0 failed, 0 errors. - `tests`: 70 passed, 0 failed, 0 errors. Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com>
Collaborator
Author
|
Original PR: sonic-net/sonic-swss#4674 |
Collaborator
Author
|
/azp run |
|
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Make duplicate VXLAN FDB delete handling idempotent in
fdbsyncdby lowering the missing-entry path inFdbSync::macDelVxlan()from error-level logging to info-level logging.This fixes the regression introduced by PR #4615 where an expected later kernel delete for a VXLAN FDB entry could log:
That message was treated as a syslog error by loganalyzer in
sonic-buildimagePR sonic-net/sonic-buildimage#27663, causingvxlan/test_vxlan_decap.py::test_vxlan_decap[Enabled]to fail even though the VXLAN decap dataplane test body passed.Why I did it
When a remote/VXLAN-learned MAC is replaced by a local MAC,
updateLocalMac()intentionally removes the entry from the VXLAN FDB cache. A later kernel delete event for the same VXLAN FDB entry is expected and should be a no-op, not an error.Before PR #4615, this missing-cache-entry delete path was silently ignored. This change restores the idempotent behavior while still leaving an info-level trace for debugging.
How I did it
FdbSync::macDelVxlan()fromSWSS_LOG_ERRORtoSWSS_LOG_INFO.TestMacDelVxlanC++/GMock test to callmacDelVxlan()twice and verify the cache remains empty after the duplicate delete.How I verified it
Validated from
sonic-buildimageusing the official SONiC bookworm slave build flow:Results from
target/debs/bookworm/swss_1.0.0_amd64.deb.log:swss_1.0.0_amd64.debbuilt successfully.dh_auto_testran.orchagent/p4orch/tests: 770 passed, 3 skipped, 0 failed, 0 errors.tests/mock_tests: 1071 passed, 1 skipped, 0 failed, 0 errors.tests: 70 passed, 0 failed, 0 errors.Signed-off-by: Sonic Build Admin sonicbld@microsoft.com