[Nexthop] Move send LLDP packets to retry loop - #1506
Open
vvasavada-nexthop wants to merge 1 commit into
Open
Conversation
Signed-off-by: Vishrant Vasavada <vvasavada@nexthop.ai>
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.
Pre-submission checklist
pip install -r requirements-dev.txt && pre-commit installpre-commit runSummary
TLDR
TX path is still settling when early LLDP sends happen, initial sends fail/partially fail, and neighbor count recovers gradually but times out at 29/32.
Detailed debugging
Switch/agent is coming up
LLDP manager tries to send but actually the packet cannot be sent out of port 1. This happens for any ports.
Test verify starts in retry loops. We slowly start getting rx packets.
Neighbor count is gradually increasing even after ~30s as tx/rx path converges
The test timeout is at 30s which may not be enough. And so we assert and exit before all LLDP neighbors are found.
Note that LLDP manager has its own retry waves at every 5s interval. However, it is possible that tx path is fully ready before test timeouts after the last retry attempt but test timesout in the next 5s interval before next LLDP wave. Hence, moving sendLldpOnAllPorts to retry loop gives more robustness as we'd retry every 1s by explicitly sending packets.
Test Plan
Was able to reproduce failure in 2-3 attempts without the fix.
The test
AgentPacketSendLldpTest.LldpLoopbackTestpasses 10/10 times with the fix.