[lldp] Add test_lldp_after_config_reload to verify LLDP recovery#22428
Closed
sonicly1g wants to merge 1 commit intosonic-net:masterfrom
Closed
[lldp] Add test_lldp_after_config_reload to verify LLDP recovery#22428sonicly1g wants to merge 1 commit intosonic-net:masterfrom
sonicly1g wants to merge 1 commit intosonic-net:masterfrom
Conversation
|
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
4ff95dd to
079f984
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
079f984 to
8ef0dbc
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Fixes sonic-net#22376. Adds a new test case that verifies LLDP neighbors are correctly restored after config reload, catching regressions where lldpd fails to detect all interfaces during boot (e.g. the race condition fixed in sonic-net/sonic-buildimage#25436). The test validates: 1. All LLDP neighbor entries present before reload are restored after 2. Chassis ID type is 'mac' (not hostname fallback from missing eth0) 3. All interfaces appear in 'lldpcli show interfaces' 4. Checks syslog for 'cannot find port' / lldpmgrd errors (warning only) Signed-off-by: Rustiqly <rustiqly@users.noreply.github.com> Signed-off-by: Sonicly1G <sonicly1g@users.noreply.github.com>
8ef0dbc to
eb36cd2
Compare
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
|
Closing to re-submit from rustiqly account (CLA already signed). |
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.
Why I did it
Fixes #22376.
Adds a new test case to cover the regression scenario described in sonic-net/sonic-buildimage#25436, where lldpd fails to detect all interfaces during boot due to a race condition between RTM_GETLINK dumps and RTM_NEWLINK messages on the same socket.
How I did it
Added
test_lldp_after_config_reloadtotests/lldp/test_lldp.pythat:config reloadmac(not hostname — which indicates eth0 wasn't found)lldpcli show interfacescannot find port/ERR lldp#lldpmgrderrors (warning, not hard fail)How to verify it
Run on any topology (t0, t1, t2, m0, mx, m1):
On a system without the sonic-buildimage#25436 fix applied (with many interfaces), this test should catch missing LLDP neighbors after config reload.